home *** CD-ROM | disk | FTP | other *** search
/ Suicid 3 / Suicid - Issue 3 (1992-11)(Energy).adf / Diskmag.S < prev    next >
Text File  |  1991-10-16  |  72KB  |  3,743 lines

  1.     org$15000
  2.     load$15000
  3. Derrel:
  4.  
  5. ;    -------------------------------------------------------------------
  6. ;    -------------------------------------------------------------------
  7. ;    Versuchstext ausschalten
  8. ;    Dsk_Start, Dsk_end und Fi_laden einschalten
  9. ;    In `DELAYER` steht Verzögerungszeit für Menuscrolling
  10. ;    -------------------------------------------------------------------
  11. ;    -------------------------------------------------------------------
  12.  
  13. DMACON = $DFF096    ;    DMA-CONTROLLREGISTER
  14. DMACONR= $02        ;    DMA-CONTROLLREGISTER LESEN
  15. INTENAR = $DFF01C      ;    INTERRUPTENABLE-REGISTER LESEN
  16. INTREQ = $DFF09C    ;    INTERRUPTANFORDERUNG
  17. INTREQR = $DFF01E    ;     INTERRUPTANFORDERUNG LESEN
  18. ;    -------------------------------------------------------------------
  19. BLTCON0= $40    ;    BLITTERCONTROLLREGISTER 0
  20. BLTCON1= $42     ;     BLITTERCONTROLLREGISTER 1
  21. BLTAFWM= $44    ;    MASKE ERSTES WORT
  22. BLTALWM= $46    ;    MASKE LSTZTES WORT    
  23. BLTCPTH= $48    ;    STARTADRESSE BLITVORGANG QUELLE C
  24. BLTCPTL= $4A    
  25. BLTBPTH= $4C    ;    STARTADRESSE BLITVORGANG QUELLE B
  26. BLTBPTL= $4E    
  27. BLTAPTH= $50    ;    STARTADRESSE BLITVORGANG QUELLE A
  28. BLTAPTL= $52    
  29. BLTDPTH= $54    ;    STARTADRESSE BLITVORGANG ZIEL D
  30. BLTDPTL= $56    
  31. BLTSIZE= $58    ;    BLITFENSTERGROESSE
  32. BLTCMOD= $60    ;    MODULOWERT QUELLE C
  33. BLTBMOD= $62    ;    MODULOWERT QUELLE B    
  34. BLTAMOD= $64    ;    MODULOWERT QUELLE A
  35. BLTDMOD= $66    ;    MODULOWERT ZIEL      D    
  36. COPLST2= $84
  37. ;    -------------------------------------------------------------------
  38. ;    -------------------------------------------------------------------
  39.         move.w    #$4000,$dff09a
  40.         MOVE.L    #COPPERLISTE,$dff084
  41.         bset    #1,$bfe001
  42.  
  43. ;    -------------------------------------------------------------------
  44. ;    --- Neues Interrupt -----------------
  45. ;    -------------------------------------
  46.  
  47.     move.w    $dff01c,d0
  48.     ori    #$8000,d0
  49.     move    d0,intena
  50.     move    #$7fff,$dff09a
  51.     move.l    104,Vector2
  52.     move.l    108,Vector3
  53.     move.l    #Inkey,104
  54.     move.l    #Interrupt,108
  55.     move.w    #$c028,$dff09a
  56.  
  57. ;    ---------------------------------
  58.  
  59.     MOVE.W    #%1000011111010000,DMACON            
  60. ;    MOVE.W    #%0000010000100000,DMACON
  61. ;    -------------------------------------------------------------------
  62.     move.l    #0,a0
  63.     move.l    #0,a1
  64.     move.l    #0,a2
  65.     move.l    #0,a3
  66.     move.l    #0,a4
  67.     move.l    #0,a5
  68.     move.l    #0,a6
  69.     move.l    #0,d0
  70.     move.l    #0,d1
  71.     move.l    #0,d2
  72.     move.l    #0,d3
  73.     move.l    #0,d4
  74.     move.l    #0,d5
  75.     move.l    #0,d6
  76.     move.l    #0,d7
  77.  
  78. ;    -------------------------------------------------------------------
  79. ;    --- Sprite-Zeiger positionieren    -----
  80. ;    -------------------------------------
  81.     move.w    #127,SpriteX
  82.     move.w    #250,SpriteY        
  83.     move.b    #00,Aussteigen
  84.     move.b    #0,Nicht_gefunden
  85.     move.l    #0,NSeite
  86. ;    -------------------------------------
  87. ;    --- Init für Artikelnummereingabe ---
  88. ;    -------------------------------------
  89.     move.l    #0,Stelle
  90.     move.l    #101,Waiter
  91.     bclr    #0,Einmal
  92.     bclr    #1,Einmal
  93.     bclr    #2,Einmal
  94.     lea    Hl_Name,a0
  95.     move.b    #"0",6(a0)
  96.     move.b    #"0",7(a0)
  97.     move.b    #"1",8(a0)
  98.     bsr.w    Artikel_Zahl
  99. ;    -------------------------------------
  100.  
  101.  
  102. ;    -------------------------------------------------------------------
  103. ;    --- Maße des Menuscreens ------------
  104. ;    -------------------------------------
  105. Breite  = 640
  106. Hoehe   = 67
  107. Planes  = 4
  108. Farben  = 16
  109. bs = Breite/8*Hoehe
  110. Farblaenge = Farben*2
  111.  
  112.  
  113. ;    -------------------------------------------------------------------
  114. ;    --- Initialisierungen ---------------
  115. ;    -------------------------------------
  116.     move.b    #0,MGd_G
  117.     bset    #0,Wahl
  118.     bclr    #0,MenuUntenMaus
  119.     move.b    #0,NichtBL
  120.  
  121.     jsr    mt_init
  122.     move.l    #Interrupt,$6c
  123.     move.l    #Copperliste,$dff084
  124.  
  125.         jsr    ClearScreen        ; Textscreen
  126.         move.l    #Screen,d0
  127.         move.l    #00,AddBitPl
  128.         move.w    #$00,$dff102
  129.         bsr    M_init_bitplanes
  130.     jsr    init_bitplanes            ; Menuscreen
  131.     jsr    color1
  132.     jsr    ClearScreen
  133.     movem.l    d0-d7/a0-a6,-(a7)
  134.     jsr    Dsk_Start
  135.     movem.l    (a7)+,d0-d7/a0-a6
  136.  
  137. ;    -------------------------------------------------------------------
  138. ;    --- SpriteDatas in Copperliste eintragen --- 
  139. ;    --------------------------------------------
  140.     lea    Sprites,a0         
  141.     move.l    #SpriteData,d0
  142.     add.l    #6,a0
  143.     move.w    d0,(a0)
  144.     sub.l    #4,a0
  145.     swap    d0
  146.     move.w    d0,(a0)
  147.     jsr    D_MausAbfrage    ; Mauszeiger gleich richtig setzen
  148.  
  149.  
  150. ;    -------------------------------------------------------------------
  151. ;    --- LOOOP: Hier laufen alle Mausabfragen ohne Interrupt --- 
  152. ;    -----------------------------------------------------------
  153.     move.l    #10,Delayer
  154.     bset    #1,MGd_G
  155.     bset    #0,MenuUntenMaus
  156.     move.w    #32800,dmacon
  157. LOOOP:    
  158.  
  159.  
  160.         btst    #0,Wahl
  161.         beq.w    M_Abfrage
  162.     Nicht_Menu:    
  163.  
  164.         btst    #0,MenuUntenMaus
  165.         bne.s    D_M_Nicht
  166.         jsr    D_MausAbfrage
  167.     D_M_Nicht:
  168.  
  169.     btst    #0,Aussteigen
  170.     bne.s    RuptEin
  171.  
  172.     btst    #0,MGd_G
  173.     bne.s    MG_Laden
  174.    After_MG_L:
  175.  
  176.     btst    #1,MGd_G
  177.     bne.s    Init_Menu
  178.    After_I_M:    
  179.  
  180. ;    btst    #10,$dff016    ;    Sicherheitsausgang
  181.     bra.s    LOOOP
  182. ;    bra.s    RuptEin
  183. ;    -----------------------------------
  184. MG_Laden:
  185.     bsr.w    MGd_Gewaehlt
  186.     bra.s    After_MG_L
  187.  
  188. Init_Menu:
  189.     jsr    Make_Menu
  190.     bra.s    After_I_M
  191.     
  192. ;    -------------------------------------------------------------------
  193. ;    --- Interrupts wiederherstellen ----
  194. ;    ------------------------------------
  195. RuptEin:            
  196.     move.w    #$7fff,$dff09a
  197.     move.l    Vector2,104
  198.     move.l    Vector3,108
  199.     move.w    intena,$dff09a
  200.  
  201.     bsr.w    Dsk_end
  202.     jsr    mt_end
  203.     move.l    #0,d0    
  204.     move.l    #0,d1
  205.     bclr    #1,$bfe001
  206.     rts            
  207.  
  208. ;    --------------------------------
  209.     Intena:        dc.l 0
  210.     Vector2:    dc.l 0
  211.     Vector3:    dc.l 0
  212.     KeyFl:        dc.b 0
  213.     KeyCode:    dc.b 0
  214.         even
  215.     RuptReg:    dc.w 0
  216.     Rupt6c:        dc.l 0
  217.     NSeite:        dc.l 0
  218.     Blaettern:    dc.b 0
  219.             even
  220. ;    --------------------------------
  221.  
  222.  
  223. ;    -------------------------------------------------------------------
  224. ;    --- Neues Interrupt -----------------
  225. ;    -------------------------------------
  226. Interrupt:
  227.     movem.l    d0-d7/a0-a6,-(a7)    
  228.  
  229.     btst    #0,MenuUntenMaus
  230.     bne.s    R_A_Nicht
  231.     jsr    Restaurieren
  232.     bsr.w    Abfrage    
  233.     bsr.w    Tasten
  234.     R_A_Nicht:
  235.  
  236.     btst    #0,IsMusic
  237.     bne.w    No
  238.         movem.l    d0-d7/a0-a6,-(a7)    
  239.     jsr    Mt_Music
  240.         movem.l    (a7)+,d0-d7/a0-a6
  241.     No:
  242.  
  243.     bsr.w    Time
  244.     bsr.w    Seite
  245.  
  246. ;    bchg    #1,$bfe001
  247.  
  248.     movem.l    (a7)+,d0-d7/a0-a6
  249.     move.w    #$0020,intreq
  250.     bclr    #0,KeyFl
  251.     move.b    #0,KeyCode
  252.     rte        
  253.  
  254. ;    ---------------------------------
  255.  
  256. Inkey:
  257.     movem.l    d0-d7/a0-a6,-(a7)
  258.     move    #8,$dff09c        ; Interruptrequestbit
  259.     btst    #3,$bfed01
  260.     bne.s    Inkey2
  261.     move.b    $bfec01,d0
  262.     ror.b    #1,d0
  263.     eori.b    #$ff,d0
  264.     bmi.w    inkey1
  265.     bset    #0,Keyfl
  266.     move.b    d0,KeyCode
  267.  
  268. ;    ---------------------------------
  269.  
  270. Inkey1:
  271.     move.b    #$ff,$bfec01
  272.     bset    #6,$bfee01
  273.     bclr    #6,$bfee01
  274.  
  275. Inkey2:
  276.     move.b    $bfed01,d0
  277.     movem.l    (a7)+,d0-d7/a0-a6
  278.     bchg    #1,$bfe001
  279.     rte
  280.  
  281. ;    ---------------------------------
  282.  
  283. ;    ----------------------
  284. MGd_G:    dc.b 0
  285.     even    
  286. ;    -----------------------------------------------
  287. ;    --- Artikelnummerneingabe über 10er Block -----
  288. ;    -----------------------------------------------
  289.  
  290. Tasten:    bsr.w    WelcheTa
  291.     cmp.l    #1,Stelle
  292.     beq.s    Einer        ; Einerstelle beschreiben
  293.     cmp.l    #2,Stelle
  294.     beq.s    Zehner        ; Einer nach Zehner; Einer neu beschreiben
  295.     cmp.l    #3,Stelle
  296.     beq.s    Hunderter    ; Ein. nach Zeh.; Zeh. nach Hund.; Einer neu 
  297.     cmp.l    #3,Stelle
  298.     bgt.w    Enter        ; Nach 3 Zahlen kann man noch mit DEL löschen, 
  299.     rts            ; 4.Taste ist autom. ENTER    
  300.  
  301. ;    -----------------------------------------------
  302.  
  303. Einer:    
  304.     btst    #2,Einmal
  305.     bne.s    Nicht_Einer
  306.     lea    Hl_Name(pc),a0
  307.     move.l    d1,d2
  308.     add.l    #48,d2
  309.     move.b    d2,8(a0)
  310. ;    move.b    #48,8(a0)
  311.     bset    #2,Einmal
  312.     bsr.w    Artikel_Zahl
  313. Nicht_Einer:
  314.     rts
  315.  
  316. Zehner: 
  317.     btst    #0,Einmal
  318.     bne.s    Nicht_Zehner
  319.     lea    Hl_Name(pc),a0
  320.     move.b    8(a0),7(a0)
  321.     move.l    d1,d2
  322.     add.l    #48,d2
  323.     move.b    d2,8(a0)
  324.     bset    #0,Einmal
  325.     bsr.w    Artikel_Zahl
  326. Nicht_Zehner:
  327.     rts
  328.  
  329. Hunderter:
  330.     btst    #1,Einmal
  331.     bne.s    Nicht_Hunderter
  332.     lea    Hl_Name(pc),a0
  333.     move.b    7(a0),6(a0)
  334.     move.b    8(a0),7(a0)
  335.     move.l    d1,d2
  336.     add.l    #48,d2
  337.     move.b    d2,8(a0)
  338.     bset    #1,Einmal
  339.     bsr.w    Artikel_Zahl
  340. Nicht_Hunderter:
  341.     rts
  342.  
  343. Enter:                ; Angaben OK -> Artikel laden
  344. ;    move.b    #$0f0,$dff180
  345. ;    bclr    #1,$bfe001
  346.     move.l    #0,Stelle
  347.     bclr    #0,Einmal
  348.     bclr    #1,Einmal
  349.     bclr    #2,Einmal
  350.     bset    #0,MGd_G
  351.     bset    #0,MenuUntenMaus
  352.  
  353.     lea    Hl_Name(pc),a0
  354.         move.l    #0,d0
  355.         move.l    #0,d1
  356.         move.l    #0,d2
  357.     move.b    6(a0),d0
  358.     move.b    7(a0),d1
  359.     move.b    8(a0),d2
  360.     sub.b    #$30,d0
  361.     sub.b    #$30,d1
  362.     sub.b    #$30,d2
  363.     
  364.     mulu    #100,d0
  365.     mulu    #10,d1
  366.     add.l    d2,d0
  367.     add.l    d1,d0
  368.  
  369.     move.l    #2,d1
  370.     cmp.l    d1,d0
  371.     blt.s    Artikel000
  372.  
  373.     move.l    AnzArt,d1
  374.     cmp.l    d1,d0
  375.     bgt.s    COlor
  376.     rts        
  377.  
  378. COlor:
  379.     move.l    AnzArt,d0
  380.     add.l    #1,d0    
  381.     bra.w    Init_Art
  382.  
  383. Artikel000:
  384. ;    move.w    #$f0f,$dff180
  385.     move.l    #001,d0
  386.     bra.w    Init_Art
  387. ;-----------------------------------------------
  388.  
  389. WelcheTa:
  390.     btst    #0,KeyFl
  391.     beq.w    Nix_da    
  392.  
  393. ;    ---------------------------------
  394.  
  395.     cmp.b    #$1d,KeyCode
  396.     beq.w    Eins
  397.     cmp.b    #$1e,KeyCode
  398.     beq.w    Zwei
  399.     cmp.b    #$1f,KeyCode
  400.     beq.w    Drei
  401.     cmp.b    #$2d,KeyCode
  402.     beq.w    Vier
  403.     cmp.b    #$2e,KeyCode
  404.     beq.w    Fuenf
  405.     cmp.b    #$2f,KeyCode
  406.     beq.w    Sechs
  407.     cmp.b    #$3d,KeyCode
  408.     beq.w    Sieben
  409.     cmp.b    #$3e,KeyCode
  410.     beq.w    Acht
  411.     cmp.b    #$3f,KeyCode
  412.     beq.w    Neun
  413.     cmp.b    #$0f,KeyCode
  414.     beq.w    Null
  415.     cmp.b    #$46,KeyCode        ; löscht alles Eingegebene (Delete)
  416.     beq.w    Neuer_Anfang
  417.     cmp.b    #$43,KeyCode        ; Eingabe abgeschlossen (Enter)
  418.     beq.w    Enter        
  419.  
  420.     cmp.b    #$4c,KeyCode        ; Softscrolling nach oben
  421.     beq.w    PfeilOben
  422.     cmp.b    #$4d,KeyCode        ; Softscrolling nach unten
  423.     beq.w    PfeilUnten
  424.     cmp.b    #$4e,KeyCode        ; Plus 1 Artikel
  425.     beq.w    PfeilRechts
  426.     cmp.b    #$4f,KeyCode        ; Minus 1 Artikel
  427.     beq.w    PfeilLinks
  428.  
  429.     cmp.b    #$5f,KeyCode        ; Menu anfordern
  430.     beq.w    Menu_Will
  431.     cmp.b    #$45,KeyCode        ; Aussteigen    !!!!!
  432.     beq.w    Weg_da                    
  433.  
  434.     bclr    #0,KeyFl
  435.     move.b    #0,KeyCode
  436. Nix_da:
  437.     rts
  438.  
  439. ;-----------------------------------------------
  440.  
  441. Eins:    move.l    #1,d1
  442.     bra.s    Allgemein    
  443. Zwei:    move.l    #2,d1
  444.     bra.s    Allgemein    
  445. Drei:    move.l    #3,d1
  446.     bra.s    Allgemein    
  447. Vier:    move.l    #4,d1
  448.     bra.s    Allgemein    
  449. Fuenf:    move.l    #5,d1
  450.     bra.s    Allgemein    
  451. Sechs:    move.l    #6,d1
  452.     bra.s    Allgemein    
  453. Sieben:    move.l    #7,d1
  454.     bra.s    Allgemein    
  455. Acht:    move.l    #8,d1
  456.     bra.s    Allgemein    
  457. Neun:    move.l    #9,d1
  458.     bra.w    Allgemein
  459. Null:    move.l    #0,d1
  460.     bra.w    Allgemein
  461. Allgemein:
  462.     add.l    #1,Stelle
  463.     move.b    #0,KeyCode
  464.     bclr    #0,KeyFl
  465.     rts
  466.  
  467. ;    ------------------------------------
  468.  
  469. PfeilOben:
  470.     move.l    #42,BobOffset
  471.     jsr    Put
  472.  
  473.     move.l    #72,Welche
  474.     jsr    Copy_Message
  475.  
  476.     move.l    AddBitPl,d0
  477.     cmp.l    #1,d0
  478.     blt.s    PFComment4
  479.  
  480.     cmp.l    #0,AddBitPl
  481.     blt.s    PfeilO
  482.  
  483.     sub.l    #400,AddBitPl
  484.     move.l    #Screen,d0
  485.     bsr    M_init_bitplanes
  486.  
  487.     PfeilO:
  488.     rts
  489.         
  490. PfComment4:
  491.     move.l    #336,Welche
  492.     jsr    Copy_Message
  493.     move.l    #00,AddBitPl
  494.     move.l    #Screen,d0
  495.     bsr    M_init_bitplanes
  496.     bra.s    PfeilO
  497.  
  498. ;    ------------------------------------
  499.  
  500. PfeilUnten:        
  501.  
  502.     move.l    #52,BobOffset
  503.     jsr    Put
  504.  
  505.     move.l    #96,Welche
  506.     jsr    Copy_Message
  507.  
  508.     move.l    AddBitPl,d0
  509.     move.l    MerkEnde,d1
  510.     sub.l    #16000,d1
  511.     cmp.l    d1,d0
  512.     bgt.s    PFComment5
  513.  
  514.     add.l    #400,AddBitPl
  515.     move.l    #Screen,d0
  516.     bsr    M_init_bitplanes
  517.     
  518.     PfeilU:
  519.     rts
  520.  
  521. PFComment5:
  522.     move.l    #360,Welche
  523.     jsr    Copy_Message
  524.     bra.s    PfeilU
  525.         
  526. ;    ------------------------------------
  527.  
  528.  
  529. PfeilLinks:
  530.     move.l    #12,BobOffset
  531.     jsr    Put
  532.  
  533.     move.l    #0,Welche
  534.     jsr    Copy_Message
  535.  
  536.     bclr    #0,SubAdd
  537.     bset    #0,MGd_G
  538.     bset    #0,MenuUntenMaus
  539.     jsr    Suicid
  540.     rts
  541.  
  542. ;    ------------------------------------
  543. SubAdd:    dc.b 0
  544.     even
  545. ;    ------------------------------------
  546.  
  547. PfeilRechts:
  548.     move.l    #22,BobOffset
  549.     jsr    Put
  550.  
  551.     move.l    #24,Welche
  552.     jsr    Copy_Message
  553.  
  554.     bset    #0,SubAdd
  555.     bset    #0,MGd_G
  556.     bset    #0,MenuUntenMaus
  557.     jsr    Suicid
  558.     rts
  559.  
  560. ;    ------------------------------------
  561.  
  562. Menu_Will:
  563.     bset    #1,MGd_G
  564.     bset    #0,MenuUntenMaus
  565.     move.l    #1,d0
  566.     bsr.w    Init_Art
  567.     rts
  568.  
  569. ;    ------------------------------------
  570.  
  571. Weg_da:
  572.     bset    #0,Aussteigen
  573.     rts
  574.  
  575. ;    ------------------------------------
  576.  
  577. ;-----------------------------------------------
  578.  
  579. Neuer_Anfang:
  580.     move.l    #0,Stelle
  581.     bsr.w    Artikel_Zahl
  582.     lea    Hl_Name(pc),a0
  583.     move.b    #"0",6(a0)
  584.     move.b    #"0",7(a0)
  585.     move.b    #"1",8(a0)
  586.     bclr    #0,Einmal
  587.     bclr    #1,Einmal
  588.     bclr    #2,Einmal
  589. ;    bclr    #1,$bfe001
  590.     rts
  591.         
  592. ;----------------------------------
  593. Stelle:        dc.l 0
  594. Waiter:        dc.l 0
  595. Einmal:        dc.b 0
  596.         even
  597. ;----------------------------------
  598.  
  599.  
  600.  
  601. ;----------------------------------------------------------------------
  602. ;--- Artikel gewählt -> ausblenden & laden & Artikelnummer kopieren ---
  603. ;----------------------------------------------------------------------
  604. M_Gewaehlt:
  605.     bsr.w    Ausblenden
  606.     
  607.     move.l    #HL_page,HL_dest    ; Zieladresse in HL_dest !!!!!!
  608.     bsr.w    Fi_Laden        ;   Hl_Name
  609.     bsr    Lade_Message
  610.  
  611.     btst    #0,Nicht_gefunden
  612.     bne.s    Nicht_da1
  613.  
  614.     movem.l    d0-d7/a0-a6,-(a7)
  615.     jsr    ClearScreen
  616.     move.l    #HL_Page,Source
  617.     move.l    #Screen,Destin
  618.     add.l    #80,Destin
  619.     jsr    Write
  620.     movem.l    (a7)+,d0-d7/a0-a6
  621. ;---------------------------------------
  622.     move.l    MerkEnde,d0
  623.     divu    #400,d0
  624.     and.l    #$0000ffff,d0
  625.     addq.l    #1,d0
  626.     mulu    #400,d0
  627.     move.l    d0,MerkEnde
  628. ;---------------------------------------
  629.         move.l    #Screen,d0
  630.         move.l    #00,AddBitPl
  631.         bsr    M_init_bitplanes
  632.  
  633. Nicht_da1:
  634.  
  635.     bsr.w    EinblendenText
  636.  
  637.     bset    #0,Wahl            ; Abfrage des Bitplanescrollings
  638.                     ; deaktivieren
  639.     bclr    #0,MenuUntenMaus    ; Mausabfrage unten einschalten
  640.  
  641.     bsr.w    Artikel_Zahl
  642.  
  643.     move.l    #288,Welche
  644.     bsr.w    Copy_Message
  645.  
  646.     rts
  647.  
  648. ;-----------------------
  649. Nicht_gefunden:    dc.b 0
  650.         even
  651. ;-----------------------
  652.  
  653. ;------------------------------------------------------------------------------
  654. ;--- Artikel mit Gadget gewählt -> ausblenden & laden & Artikelnr. kopieren ---
  655. ;------------------------------------------------------------------------------
  656. MGd_Gewaehlt:
  657.  
  658.     btst    #0,NichtBL
  659.     bne.w    ExtremArtikel
  660.  
  661.     bsr.w    AusblendenText
  662.     
  663.     move.l    #HL_page,HL_dest    ; Zieladresse in HL_dest !!!!!!
  664.     bsr.w    Fi_Laden        ;   Hl_Name
  665.     bsr    Lade_Message
  666.  
  667.     btst    #0,Nicht_gefunden
  668.     bne.s    Nicht_da2
  669.  
  670.     movem.l    d0-d7/a0-a6,-(a7)
  671.     jsr    ClearScreen
  672.     move.l    #HL_Page,Source
  673.     move.l    #Screen,Destin
  674.     add.l    #80,Destin
  675.     jsr    Write
  676.     movem.l    (a7)+,d0-d7/a0-a6
  677. ;---------------------------------------
  678.     move.l    MerkEnde,d0
  679.     divu    #400,d0
  680.     and.l    #$0000ffff,d0
  681.     addq.l    #1,d0
  682.     mulu    #400,d0
  683.     move.l    d0,MerkEnde
  684. ;---------------------------------------
  685.  
  686.         move.l    #Screen,d0
  687.         move.l    #00,AddBitPl
  688.         bsr    M_init_bitplanes
  689.  
  690. Nicht_da2:
  691.     bsr.w    EinblendenText
  692.  
  693.     bset    #0,Wahl            ; Abfrage des Bitplanescrollings
  694.                     ; deaktivieren
  695.     bclr    #0,MenuUntenMaus    ; Mausabfrage unten einschalten
  696.  
  697.     bsr.s    Artikel_Zahl
  698.  
  699.     move.l    #288,Welche
  700.     bsr.w    Copy_Message
  701.  
  702.     bclr    #0,MGd_G
  703.     rts
  704.  
  705. ExtremArtikel:
  706.     bclr    #0,NichtBL
  707.     bset    #0,MGd_G
  708.     bclr    #0,MGd_G
  709.                     ; deaktivieren
  710.     bclr    #0,MenuUntenMaus    ; Mausabfrage unten einschalten
  711. ;    bsr.s    Artikel_Zahl
  712.  
  713.     move.l    #312,Welche
  714.     bsr.w    Copy_Message
  715. ;    move.w    #$00f,$dff180
  716.     rts
  717.  
  718. ;------------------------------------------------------------------------------
  719. ;--- Artikelnummer in Screen kopieren -----------------------------------------
  720. ;------------------------------------------------------------------------------
  721. Artikel_Zahl:
  722.     lea    Hl_name(pc),a2
  723.     move.l    #0,d0
  724.     move.l    #0,d1
  725.     move.l    #0,d2
  726.     
  727.     move.b    6(a2),d0
  728.     move.b    7(a2),d1
  729.     move.b    8(a2),d2
  730.  
  731.     sub.b    #33,d0
  732.     sub.b    #33,d1
  733.     sub.b    #33,d2
  734.  
  735.     lea    Menu,a0        ; 1.Artikel Zahl (Hunderter)
  736.     add.l    #4200,a0
  737.     lea    Font2,a1    
  738.     add.l    d0,a1        
  739.     bsr.w    Copy_Zahl
  740.  
  741.     lea    Menu,a0        ; 2.Artikel Zahl (Zehner)
  742.     add.l    #4201,a0
  743.     lea    Font2,a1    
  744.     add.l    d1,a1        
  745.     bsr.w    Copy_Zahl
  746.  
  747.     lea    Menu,a0        ; 3.Artikel Zahl (Einer)
  748.     add.l    #4202,a0
  749.     lea    Font2,a1    
  750.     add.l    d2,a1        
  751.     bsr.w    Copy_Zahl
  752.     rts
  753.  
  754. ;------------------------------------------------------------------------------
  755. ;--- Seite ausrechnen und Zahl in Screen kopieren -----------------------------
  756. ;------------------------------------------------------------------------------
  757. S_Zahl:    dc.l 0    
  758. ;----------------------------------
  759. Seite:
  760.     move.l    #16000,S_Zahl
  761.     move.l    AddBitPl,d1
  762.     add.l    d1,S_Zahl
  763.     move.l    S_Zahl,d0
  764.     divu    #16000,d0
  765.     move.l    #0,d4
  766.     move.b    d0,d4
  767. ;    move.b    #136,d4
  768.  
  769.     move.l    #0,d0
  770.     move.l    #0,d1
  771.     move.l    #0,d2
  772.  
  773.     divu    #10,d4
  774.     swap    d4
  775.     move.b    d4,d2        ; Einer
  776.     swap    d4
  777.     and.l    #$0000ffff,d4
  778.     divu    #10,d4
  779.     move.b    d4,d0        ; Hunderter
  780.     swap    d4
  781.     move.b    d4,d1        ; Zehner
  782.  
  783.  
  784.     add.b    #15,d0
  785.     add.b    #15,d1
  786.     add.b    #15,d2
  787.  
  788.     lea    Menu,a0        ; 1.Artikel Zahl (Hunderter)
  789.     add.l    #4209,a0
  790.     lea    Font2,a1    
  791.     add.l    d0,a1        
  792.     bsr.w    Copy_Zahl
  793.  
  794.     lea    Menu,a0        ; 2.Artikel Zahl (Zehner)
  795.     add.l    #4210,a0
  796.     lea    Font2,a1    
  797.     add.l    d1,a1        
  798.     bsr.w    Copy_Zahl
  799.  
  800.     lea    Menu,a0        ; 3.Artikel Zahl (Einer)
  801.     add.l    #4211,a0
  802.     lea    Font2,a1    
  803.     add.l    d2,a1        
  804.     bsr.w    Copy_Zahl
  805.  
  806.     rts
  807.  
  808. ;--------------------------------------------------------
  809. ;--- Hardware File Loader -------------------------------
  810. ;--------------------------------------------------------
  811.  
  812.  
  813. HL_namelength=9
  814.  
  815.  
  816. Lade_Message:
  817.     btst    #0,Nicht_gefunden
  818.     beq.s    NeinS
  819.     bra.s    Ja
  820.  
  821. NeinS:
  822.     move.l    #240,Welche
  823.     bsr.w    Copy_Message
  824.     rts
  825.  
  826. Ja:
  827.     move.l    #264,Welche
  828.     bsr.w    Copy_Message
  829.     rts
  830.  
  831.  
  832. ;    ----------------------------------------------------------------
  833. ;    ----------------------------------------------------------------
  834. ;        bsr.s    Write
  835. ;    ----------------------------------------------------------------
  836. Source:    dc.l 0
  837. Destin:    dc.l 0
  838. ;    ----------------------------------------------------------------
  839.  
  840. Write:
  841.     move.l    #-2,Wort
  842.     move.l    #0,ZeichenCounter
  843.     move.l    #0,WeiterText
  844.     move.b    #0,SpaceTwo
  845.  
  846. Naechster:
  847.     btst    #0,SpaceTwo
  848.     beq.w    AddWort2
  849.     move.l    Source,a3
  850.     move.l    #0,d0
  851.     move.l    #0,d1
  852.     add.l    WeiterText,a3
  853.     move.b    (a3)+,d0
  854.     move.b    (a3)+,d1
  855.     add.l    #2,WeiterText
  856.     addq.l    #1,ZeichenCounter
  857.     cmp.l    #42,ZeichenCounter
  858.     bgt.s    AddWort
  859.     AfterWort:
  860.  
  861.     cmp.b    #-1,d0
  862.     beq.w    Fertig
  863.     cmp.b    #-1,d1
  864.     beq.w    Fertig
  865.  
  866.     cmp.b    #10,d0        ; Return
  867.     beq.w    AddWort2.1
  868.     cmp.b    #10,d1
  869.     beq.w    TwoSpace2
  870.  
  871.     cmp.b    #9,d0        ; Tabulator
  872.     beq.w    Tab1
  873.     cmp.b    #9,d1
  874.     beq.w    Tab
  875.  
  876.     cmp.b    #32,d0
  877.     beq.w    Space1
  878.     AfterSpace1:
  879.     cmp.b    #32,d1
  880.     beq.w    TwoSpace
  881.     AfterSpace2:
  882.  
  883.     sub.l    #33,d0
  884.     sub.l    #33,d1
  885.  
  886.     add.l    #2,Wort        ; Mit Blitter 1 Wort weiter
  887.  Los:
  888.     move.l    d0,d2
  889.     divu    #2,d2
  890.     swap    d2        
  891.     and.l    #$0000ffff,d2
  892.     tst.w    d2
  893.     bne.w    Zahl1Gerade
  894.     beq.w    Zahl1Ungerade
  895. ;    ----------------------------------------------------------------
  896. ;    ----- Zweite Byte ist ein Space -----
  897. TwoSpace2:
  898.     bchg    #0,SpaceTwo
  899. TwoSpace:
  900.     bsr.w    Space2
  901.     bra.s    Los
  902. ;    ----------------------------------------------------------------
  903. AddWort:
  904.     add.l    #720,Wort
  905.     move.l    #1,ZeichenCounter
  906.     add.l    #0,WeiterText
  907.     bra.w    Naechster
  908.  
  909. AddWort2.1:
  910.     sub.l    #1,WeiterText
  911.     bra.s    AddW
  912. AddWort2:
  913.     bset    #0,SpaceTwo
  914. AddW:    add.l    #720,Wort
  915.     move.l    #1,ZeichenCounter
  916.     move.l    Wort,d0
  917.     move.l    d0,d1
  918.     divu    #80,d0
  919.     and.l    #$0000ffff,d0
  920.     add.l    #1,d0
  921.     mulu    #80,d0
  922.     sub.l    d1,d0
  923.     add.l    d0,Wort    
  924.     sub.l    #2,Wort
  925.     bra.w    Naechster
  926.  
  927.  
  928. Tab1:
  929.     sub.l    #1,WeiterText
  930. Tab:
  931.     add.l    #8,Wort
  932.     bra.w    Naechster
  933. ;    ----------------------------------------------------------------
  934. ZeichenCounter:    dc.l 0
  935. WeiterText:    dc.l 0
  936. SpaceTwo:    dc.b 0
  937.         even
  938. ;    ----------------------------------------------------------------
  939. Space1:
  940.     move.l    #61,d0
  941.     add.l    #2,Wort
  942.     cmp.b    #32,d1
  943.     beq.w    Space3
  944.     sub.l    #33,d1
  945.     bra.w    Los
  946. Space3:
  947.     move.l    #61,d1
  948.     bra.w    Los
  949.  
  950.  
  951. Space2:
  952.     sub.l    #33,d0
  953.     move.l    #61,d1
  954.     add.l    #2,Wort
  955.     rts
  956. ;    ----------------------------------------------------------------
  957.  
  958.  
  959. ;    ----------------------------------------------------------------
  960. ;    ----------------------------------------------------------------
  961. ;    --- Zahl 1 ist ungerade ----------------------------------------
  962. ;    ----------------------------------------------------------------
  963. ;    ----------------------------------------------------------------
  964. Zahl1Ungerade:
  965.     move.l    d1,d2
  966.     divu    #2,d2
  967.     swap    d2        
  968.     and.l    #$0000ffff,d2
  969.     tst.w    d2
  970.     bne.w    Zahl2Gerade1
  971.     beq.w    Zahl2Ungerade1
  972. ;    --------------------------------------------
  973. ;    --- Zahl 1 ungerade; Zahl 2 ist gerade -----
  974. ;    --------------------------------------------
  975. Zahl2Gerade1:
  976.     move.l    d0,FontOffset2
  977.     lea    $dff000,a6
  978.     move.w    #1,d7
  979.     lea    Font,a0
  980.     move.l    Destin,a1
  981.     add.l    FontOffset2,a0
  982.     add.l    Wort,a1
  983.  
  984. CopyZG1:
  985.     move.l    a0,bltapth(a6)
  986.     move.l    a1,bltdpth(a6)
  987.     move.l    #$ffffff00,bltafwm(a6)
  988.     move.w    #92,bltamod(a6)
  989.     move.w    #78,bltdmod(a6)
  990.     clr.w    bltcon1(a6)
  991.     move.w    #$09f0,bltcon0(a6)
  992.     move.w    #9*64+1,bltsize(a6)
  993. BltZG1:
  994.     btst    #14,dmaconr(a6)
  995.     bne.s    BltZG1
  996.     add.l    #846,a0
  997.     add.l    #M_bs,a1
  998.     dbra    d7,CopyZG1
  999.  
  1000. ;    --------------------------------------------
  1001.  
  1002.     move.l    d1,FontOffset2
  1003.     lea    $dff000,a6
  1004.     move.w    #1,d7
  1005.     lea    Font2,a0
  1006.     lea    Font,a1
  1007.     move.l    Destin,a2
  1008.     add.l    FontOffset2,a0
  1009.     add.l    FontOffset2,a1
  1010.     add.l    Wort,a2
  1011.  
  1012. CopyZG2:
  1013.     move.l    a0,bltapth(a6)
  1014.     move.l    a1,bltbpth(a6)
  1015.     move.l    a2,bltcpth(a6)
  1016.     move.l    a2,bltdpth(a6)
  1017.     move.l    #$ffff00ff,bltafwm(a6)
  1018.     move.w    #92,bltamod(a6)
  1019.     move.w    #92,bltbmod(a6)
  1020.     move.w    #78,bltcmod(a6)
  1021.     move.w    #78,bltdmod(a6)
  1022.     clr.w    bltcon1(a6)
  1023.     move.w    #$0fca,bltcon0(a6)
  1024.     move.w    #9*64+1,bltsize(a6)
  1025.  
  1026. BltZG2:
  1027.  
  1028.     btst    #14,dmaconr(a6)
  1029.     bne.s    BltZG2
  1030.     add.l    #846,a1
  1031.     add.l    #M_bs,a2
  1032.     dbra    d7,CopyZG2    
  1033.     bra.w    Naechster
  1034.     
  1035. ;    --------------------------------------------
  1036. ;    --- Zahl 1 ungerade; Zahl 2 ist ungerade ---
  1037. ;    --------------------------------------------
  1038. Zahl2Ungerade1:
  1039.  
  1040.     move.l    d0,FontOffset2
  1041.     lea    $dff000,a6
  1042.     move.w    #1,d7
  1043.     lea    Font,a0
  1044.     move.l    Destin,a1
  1045.     add.l    FontOffset2,a0
  1046.     add.l    Wort,a1
  1047.  
  1048. CopyZG3:
  1049.     move.l    a0,bltapth(a6)
  1050.     move.l    a1,bltdpth(a6)
  1051.     move.l    #$ffffff00,bltafwm(a6)
  1052.     move.w    #92,bltamod(a6)
  1053.     move.w    #78,bltdmod(a6)
  1054.     clr.w    bltcon1(a6)
  1055.     move.w    #$09f0,bltcon0(a6)
  1056.     move.w    #9*64+1,bltsize(a6)
  1057. BltZG3:
  1058.     btst    #14,dmaconr(a6)
  1059.     bne.s    BltZG3
  1060.     add.l    #846,a0
  1061.     add.l    #M_bs,a1
  1062.     dbra    d7,CopyZG3
  1063.  
  1064. ;    --------------------------------------------
  1065.  
  1066.     move.l    d1,FontOffset2
  1067.     lea    $dff000,a6
  1068.     move.w    #1,d7
  1069.     lea    Font2,a0
  1070.     lea    Font,a1
  1071.     move.l    Destin,a2
  1072.     add.l    FontOffset2,a0
  1073.     add.l    FontOffset2,a1
  1074.     add.l    Wort,a2
  1075.  
  1076. CopyZG4:
  1077.     move.l    a0,bltapth(a6)
  1078.     move.l    a1,bltbpth(a6)
  1079.     move.l    a2,bltcpth(a6)
  1080.     move.l    a2,bltdpth(a6)
  1081.     move.l    #$ffffff00,bltafwm(a6)
  1082.     move.w    #92,bltamod(a6)
  1083.     move.w    #92,bltbmod(a6)
  1084.     move.w    #78,bltcmod(a6)
  1085.     move.w    #78,bltdmod(a6)
  1086.     move.w    #$8000,bltcon1(a6)
  1087.     move.w    #$8fca,bltcon0(a6)
  1088.     move.w    #9*64+1,bltsize(a6)
  1089. BltZG4:
  1090.     btst    #14,dmaconr(a6)
  1091.     bne.s    BltZG4
  1092.     add.l    #846,a1
  1093.     add.l    #M_bs,a2
  1094.     dbra    d7,CopyZG4
  1095.  
  1096.     bra.w    Naechster
  1097.  
  1098.  
  1099.  
  1100. ;    ----------------------------------------------------------------
  1101. ;    ----------------------------------------------------------------
  1102. ;    --- Zahl 1 ist gerade ------------------------------------------
  1103. ;    ----------------------------------------------------------------
  1104. ;    ----------------------------------------------------------------
  1105. Zahl1Gerade:
  1106.     move.l    d1,d2
  1107.     divu    #2,d2
  1108.     swap    d2        
  1109.     and.l    #$0000ffff,d2
  1110.     tst.w    d2
  1111.     bne.w    Zahl2Gerade2
  1112.     beq.w    Zahl2Ungerade2
  1113. ;    --------------------------------------------
  1114. ;    --- Zahl 2 gerade; Zahl 2 ist ungerade -----
  1115. ;    --------------------------------------------
  1116. Zahl2Ungerade2:
  1117.     move.l    d0,FontOffset2
  1118.     lea    $dff000,a6
  1119.     move.w    #1,d7
  1120.     lea    Font2,a0
  1121.     lea    Font,a1
  1122.     move.l    Destin,a2
  1123.     add.l    FontOffset2,a0
  1124.     add.l    FontOffset2,a1
  1125.     add.l    Wort,a2
  1126.     sub.l    #80,a2
  1127.  
  1128. CopyZG7:
  1129.     move.l    a0,bltapth(a6)
  1130.     move.l    a1,bltbpth(a6)
  1131.     move.l    a2,bltcpth(a6)
  1132.     move.l    a2,bltdpth(a6)
  1133.     move.l    #$ffff00ff,bltafwm(a6)
  1134.     move.w    #92,bltamod(a6)
  1135.     move.w    #92,bltbmod(a6)
  1136.     move.w    #78,bltcmod(a6)
  1137.     move.w    #78,bltdmod(a6)
  1138.     move.w    #$8000,bltcon1(a6)
  1139.     move.w    #$8fca,bltcon0(a6)
  1140.     move.w    #9*64+1,bltsize(a6)
  1141. BltZG7:
  1142.     btst    #14,dmaconr(a6)
  1143.     bne.s    BltZG7
  1144.     add.l    #846,a1
  1145.     add.l    #M_bs,a2
  1146.     dbra    d7,CopyZG7
  1147.  
  1148. ;    --------------------------------------------
  1149.  
  1150.     move.l    d1,FontOffset2
  1151.     lea    $dff000,a6
  1152.     move.w    #1,d7
  1153.     lea    Font2,a0
  1154.     lea    Font,a1
  1155.     move.l    Destin,a2
  1156.     add.l    FontOffset2,a0
  1157.     add.l    FontOffset2,a1
  1158.     add.l    Wort,a2
  1159. ;    sub.l    #80,a2
  1160. ;    add.l    #640,a2
  1161.  
  1162. CopyZG8:
  1163.     move.l    a0,bltapth(a6)
  1164.     move.l    a1,bltbpth(a6)
  1165.     move.l    a2,bltcpth(a6)
  1166.     move.l    a2,bltdpth(a6)
  1167.     move.l    #$ffffff00,bltafwm(a6)
  1168.     move.w    #92,bltamod(a6)
  1169.     move.w    #92,bltbmod(a6)
  1170.     move.w    #78,bltcmod(a6)
  1171.     move.w    #78,bltdmod(a6)
  1172.     move.w    #$8000,bltcon1(a6)
  1173.     move.w    #$8fca,bltcon0(a6)
  1174.     move.w    #9*64+1,bltsize(a6)
  1175. BltZG8:
  1176.     btst    #14,dmaconr(a6)
  1177.     bne.s    BltZG8
  1178.     add.l    #846,a1
  1179.     add.l    #M_bs,a2
  1180.     dbra    d7,CopyZG8
  1181.  
  1182.     bra.w    Naechster
  1183.  
  1184. ;    --------------------------------------------
  1185. ;    --- Zahl 1 gerade; Zahl 2 ist gerade -------
  1186. ;    --------------------------------------------
  1187. Zahl2Gerade2:
  1188.  
  1189.     move.l    d1,FontOffset2
  1190.     lea    $dff000,a6
  1191.     move.w    #1,d7
  1192.     lea    Font,a0
  1193.     move.l    Destin,a1
  1194.     add.l    FontOffset2,a0
  1195.     add.l    Wort,a1
  1196.  
  1197. CopyZG5:
  1198.     move.l    a0,bltapth(a6)
  1199.     move.l    a1,bltdpth(a6)
  1200.     move.l    #$ffff00ff,bltafwm(a6)
  1201.     move.w    #92,bltamod(a6)
  1202.     move.w    #78,bltdmod(a6)
  1203.     clr.w    bltcon1(a6)
  1204.     move.w    #$09f0,bltcon0(a6)
  1205.     move.w    #9*64+1,bltsize(a6)
  1206. BltZG5:
  1207.     btst    #14,dmaconr(a6)
  1208.     bne.s    BltZG5
  1209.     add.l    #846,a0
  1210.     add.l    #M_bs,a1
  1211.     dbra    d7,CopyZG5
  1212.  
  1213. ;    --------------------------------------------
  1214.  
  1215.     move.l    d0,FontOffset2
  1216.     lea    $dff000,a6
  1217.     move.w    #1,d7
  1218.     lea    Font2,a0
  1219.     lea    Font,a1
  1220.     move.l    Destin,a2
  1221.     add.l    FontOffset2,a0
  1222.     add.l    FontOffset2,a1
  1223.     add.l    Wort,a2
  1224.     sub.l    #80,a2
  1225.  
  1226. CopyZG6:
  1227.     move.l    a0,bltapth(a6)
  1228.     move.l    a1,bltbpth(a6)
  1229.     move.l    a2,bltcpth(a6)
  1230.     move.l    a2,bltdpth(a6)
  1231.     move.l    #$ffff00ff,bltafwm(a6)
  1232.     move.w    #92,bltamod(a6)
  1233.     move.w    #92,bltbmod(a6)
  1234.     move.w    #78,bltcmod(a6)
  1235.     move.w    #78,bltdmod(a6)
  1236.     move.w    #$8000,bltcon1(a6)
  1237.     move.w    #$8fca,bltcon0(a6)
  1238.     move.w    #9*64+1,bltsize(a6)
  1239. BltZG6:
  1240.     btst    #14,dmaconr(a6)
  1241.     bne.s    BltZG6
  1242.     add.l    #846,a1
  1243.     add.l    #M_bs,a2
  1244.     dbra    d7,CopyZG6
  1245.  
  1246.  
  1247.     bra.w    Naechster
  1248.  
  1249.  
  1250. Fertig:
  1251.     move.l    Wort,MerkEnde
  1252.     move.l    #00,AddBitPl
  1253.     rts
  1254. ;    ----------------------------------------------------------------
  1255. FontOffset:    dc.l 0
  1256. ;    ----------------------------------------------------------------
  1257. Wort:    dc.l 0
  1258. Double:    dc.b 0
  1259.     even    
  1260. ;    ----------------------------------------------------------------
  1261.  
  1262. ;------------------------------------------------------------------------------
  1263. ;------------------------------------------------------------------------------
  1264. ;------------------------------------------------------------------------------
  1265. ;    --------------------------
  1266. Time_Count:    dc.l 0
  1267. Sek:        dc.l 0
  1268. Min:        dc.l 0
  1269. EZ:        dc.l 0
  1270. ZZ:        dc.l 0
  1271. ;    --------------------------
  1272. ;--------------------------------------------------------
  1273. ;--- Zeit ausrechnen und ins Menu kopieren --------------
  1274. ;--------------------------------------------------------
  1275. Time:    
  1276.     addq.l    #1,Time_Count
  1277.     cmp.l    #50,Time_Count
  1278.     beq.s    Sekunde
  1279.     rts
  1280.  
  1281. Sekunde:
  1282.  
  1283.     move.l    #0,Time_Count
  1284.     add.l    #1,Sek
  1285.     cmp.l    #60,Sek
  1286.     beq.s    Minute
  1287.     bra.s    Copy_Zeit
  1288.  
  1289. Minute:
  1290.     sub.l    #60,Sek
  1291.     add.l    #1,Min    
  1292.     cmp.l    #60,Min
  1293.     beq.s    Stunde    
  1294.     bra.s    Copy_Zeit
  1295.     
  1296. Stunde:
  1297.     move.l    #0,Min
  1298.     bra.w    Copy_Zeit
  1299.     
  1300.  
  1301.  
  1302.  
  1303. ;---------------------------------------
  1304. ;--- Sekunden umrechnen & kopieren -----
  1305. ;---------------------------------------
  1306. Copy_Zeit:
  1307.     move.l    Sek,d0
  1308.     divu    #10,d0
  1309.     move.w    d0,d2
  1310.     and.l    #$0000ffff,d2
  1311.     move.l    d2,ZZ
  1312.     swap    d0
  1313.     and.l    #$0000ffff,d0
  1314.     move.l    d0,EZ    
  1315.  
  1316.     move.l    #0,d1            ; EZ Sekunde
  1317.     lea    Menu,a0
  1318.     add.l    #4222,a0
  1319.     lea    Font2,a1
  1320.     move.l    #48,d1
  1321.     add.l    EZ,d1
  1322.     sub.l    #33,d1
  1323.     add.l    d1,a1
  1324.     bsr.w    Copy_Zahl
  1325.  
  1326.     move.l    #0,d1            ; ZZ Sekunde
  1327.     lea    Menu,a0
  1328.     add.l    #4221,a0
  1329.     lea    Font2,a1
  1330.     move.l    #48,d1
  1331.     add.l    ZZ,d1
  1332.     sub.l    #33,d1
  1333.     add.l    d1,a1
  1334.     bsr.w    Copy_Zahl
  1335.  
  1336. ;---------------------------------------
  1337. ;--- Doppelpunkt -----------------------
  1338. ;---------------------------------------
  1339.     move.l    #0,d1            ; :
  1340.     lea    Menu,a0
  1341.     add.l    #4220,a0
  1342.     lea    Font2,a1
  1343.     add.l    #25,a1
  1344.     bsr.w    Copy_Zahl
  1345.  
  1346.  
  1347. ;---------------------------------------
  1348. ;--- Minuten umrechnen & kopieren ------
  1349. ;---------------------------------------
  1350.  
  1351.     move.l    Min,d0
  1352.     divu    #10,d0
  1353.     move.w    d0,d2
  1354.     and.l    #$0000ffff,d2
  1355.     move.l    d2,ZZ
  1356.     swap    d0
  1357.     and.l    #$0000ffff,d0
  1358.     move.l    d0,EZ
  1359.  
  1360.  
  1361.     move.l    #0,d1            ; EZ Minute
  1362.     lea    Menu,a0
  1363.     add.l    #4219,a0
  1364.     lea    Font2,a1
  1365.     move.l    #48,d1
  1366.     add.l    EZ,d1
  1367.     sub.l    #33,d1
  1368.     add.l    d1,a1
  1369.     bsr.s    Copy_Zahl
  1370.  
  1371.     move.l    #0,d1            ; ZZ Minute
  1372.     lea    Menu,a0
  1373.     add.l    #4218,a0
  1374.     lea    Font2,a1
  1375.     move.l    #48,d1
  1376.     add.l    ZZ,d1
  1377.     sub.l    #33,d1
  1378.     add.l    d1,a1
  1379.     bsr.s    Copy_Zahl
  1380.  
  1381.     rts
  1382.  
  1383.  
  1384.  
  1385. Copy_Zahl:
  1386.     move.l    #7,d6    
  1387. Gush:
  1388.     move.b    (a1),(a0)
  1389.     add.l    #94,a1            ; Font Offset
  1390.     add.l    #80,a0            ; Screen Offset
  1391.     dbra    d6,Gush        
  1392.     rts
  1393.  
  1394. ;    -------------------------------------------------------------------
  1395. ;    --- MENU - Routine ------------------------------------------------
  1396. ;    -------------------------------------------------------------------
  1397. M_Breite  = 640
  1398. M_Hoehe   = 1200
  1399. M_Planes  = 2
  1400. M_Farben  = 4
  1401. M_bs = M_Breite/8*M_Hoehe
  1402. M_Farblaenge = M_Farben*2
  1403. ;    -------------------------------------------------------------------
  1404. ;    --- Initialisieren und Text in Bitplane schreiben -----------------
  1405. ;    -------------------------------------------------------------------
  1406.  
  1407.     
  1408. ;    -------------------------------------------------------------------
  1409. ;    --- Lesetext einblenden --------------------------------------------
  1410. ;    -------------------------------------------------------------------
  1411.  EinBlenden:
  1412.     lea    M_ColorsX(pc),a0
  1413.     lea    M_ColorsY(pc),a2
  1414.     
  1415.     Ein:
  1416.     cmp.b    #$a0,$dff006
  1417.     bne.s    Ein
  1418.     addq.l    #1,Blenden
  1419.     cmp.l    #8,Blenden
  1420.     blt.s    Ein
  1421.     lea    M_Colors(pc),a1        ; in Copperliste
  1422.     add.l    #2,a1            
  1423.     lea    M_Balken(pc),a3
  1424.     add.l    #2,a3
  1425.     move.l    #0,Blenden    
  1426.     move.w    #3,d7
  1427.     Aendern:
  1428.     move.w    (a0)+,d0
  1429.     cmp.w    #-1,d0
  1430.     beq.w    Fertig1
  1431.     move.w    d0,(a1)
  1432.     add.l    #4,a1
  1433.  
  1434.     move.w    (a2)+,(a3)
  1435.     add.l    #8,a3    
  1436.  
  1437.     dbra    d7,Aendern
  1438.     bra.s    Ein
  1439.   Fertig1:
  1440.     move.l    #0,Blenden
  1441.     rts
  1442.  
  1443. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1444. M_ColorsX:    dc.w    $000,$210,$100,$000 ;Hintergrund:
  1445.         dc.w    $000,$420,$300,$100    1.Spalte und 2.Block
  1446.         dc.w    $000,$640,$500,$300
  1447.         dc.w    $000,$860,$720,$510
  1448.         dc.w    $000,$a80,$940,$720
  1449.         dc.w    $000,$b90,$a50,$820
  1450.         dc.w    $000,$ca0,$b60,$930
  1451.         dc.w    $000,$ec0,$d80,$b40
  1452.         dc.w    -1,-1,-1
  1453. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1454. M_ColorsY:    dc.w    $001,$001,$000,$000
  1455.         dc.w    $003,$003,$001,$000
  1456.         dc.w    $005,$005,$002,$000
  1457.         dc.w    $007,$006,$003,$000
  1458.         dc.w    $019,$007,$003,$000
  1459.         dc.w    $02b,$008,$004,$000
  1460.         dc.w    $03d,$009,$004,$000
  1461.         dc.w    $04f,$00a,$005,$000
  1462. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1463.  
  1464. ;    -------------------------------------------------------------------
  1465. ;    --- Ausblenden ----------------------------------------------------
  1466. ;    -------------------------------------------------------------------
  1467.  AusBlenden:
  1468.     lea    M_ColorsX2(pc),a0
  1469.     lea    M_ColorsY2(pc),a2
  1470.     
  1471.     Aus:
  1472.     cmp.b    #$a0,$dff006
  1473.     bne.s    Aus
  1474.     addq.l    #1,Blenden
  1475.     cmp.l    #8,Blenden
  1476.     blt.w    Aus
  1477.     lea    M_Colors(pc),a1        ; in Copperliste
  1478.     add.l    #2,a1            
  1479.     lea    M_Balken(pc),a3
  1480.     add.l    #2,a3
  1481.     move.l    #0,Blenden    
  1482.     move.w    #3,d7
  1483.     AendernA:
  1484.     move.w    (a0)+,d0
  1485.     cmp.w    #-1,d0
  1486.     beq.s    FertigA
  1487.     move.w    d0,(a1)
  1488.     add.l    #4,a1
  1489.  
  1490.     move.w    (a2)+,(a3)
  1491.     add.l    #8,a3    
  1492.  
  1493.     dbra    d7,AendernA
  1494.     bra.s    Aus
  1495.   FertigA:
  1496.     move.l    #0,Blenden
  1497.     rts
  1498.  
  1499. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1500. M_ColorsX2:
  1501.         dc.w    $000,$ec0,$d80,$b40
  1502.         dc.w    $000,$ca0,$b60,$930
  1503.         dc.w    $000,$b90,$a50,$820
  1504.         dc.w    $000,$a80,$940,$720
  1505.         dc.w    $000,$860,$720,$510
  1506.         dc.w    $000,$640,$500,$300
  1507.         dc.w    $000,$420,$300,$100
  1508.         dc.w    $000,$000,$000,$000
  1509.         dc.w    -1,-1,-1
  1510. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1511. M_ColorsY2:    
  1512.         dc.w    $04f,$00a,$005,$000
  1513.         dc.w    $03d,$009,$004,$000
  1514.         dc.w    $02b,$008,$004,$000
  1515.         dc.w    $019,$007,$003,$000
  1516.         dc.w    $007,$006,$003,$000
  1517.         dc.w    $005,$005,$002,$000
  1518.         dc.w    $003,$003,$001,$000
  1519.         dc.w    $000,$000,$000,$000
  1520. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1521. Blenden:    dc.l 0
  1522.         even
  1523. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1524.  
  1525.  
  1526. ;    -------------------------------------------------------------------
  1527. ;    --- Einblenden ----------------------------------------------------
  1528. ;    -------------------------------------------------------------------
  1529.  EinBlendenText:
  1530.     lea    M_ColorsText(pc),a0
  1531.     lea    M_ColorsTextB(pc),a2
  1532.     
  1533.     EinT:
  1534.     cmp.b    #$a0,$dff006
  1535.     bne.s    EinT
  1536.     addq.l    #1,Blenden
  1537.     cmp.l    #8,Blenden
  1538.     blt.s    EinT
  1539.     lea    M_Colors(pc),a1        ; in Copperliste
  1540.     add.l    #2,a1            
  1541.     lea    M_Balken(pc),a3
  1542.     add.l    #2,a3
  1543.     move.l    #0,Blenden    
  1544.     move.w    #3,d7
  1545.     AendernT:
  1546.     move.w    (a0)+,d0
  1547.     cmp.w    #-1,d0
  1548.     beq.w    Fertig1T
  1549.     move.w    d0,(a1)
  1550.     add.l    #4,a1
  1551.  
  1552.     move.w    (a2)+,(a3)
  1553.     add.l    #8,a3    
  1554.  
  1555.     dbra    d7,AendernT
  1556.     bra.s    EinT
  1557.   Fertig1T:
  1558.     move.l    #0,Blenden
  1559.     rts
  1560.  
  1561. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø    ; Lesetext
  1562. M_ColorsText:
  1563.         dc.w    $000,$000,$000,$000
  1564.         dc.w    $000,$222,$222,$111
  1565.         dc.w    $001,$444,$333,$222
  1566.         dc.w    $111,$666,$444,$222
  1567.         dc.w    $112,$888,$555,$333
  1568.         dc.w    $112,$aaa,$666,$444
  1569.         dc.w    $223,$ccc,$888,$555
  1570.         dc.w    $223,$eee,$aaa,$666    ;0ec 0d8 0b4
  1571.         dc.w    -1,-1,-1
  1572. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1573. M_ColorsTextB:    
  1574.         dc.w    $000,$000,$000,$000
  1575.         dc.w    $000,$000,$000,$000
  1576.         dc.w    $001,$001,$001,$001
  1577.         dc.w    $111,$111,$111,$111
  1578.         dc.w    $112,$112,$112,$112
  1579.         dc.w    $112,$112,$112,$112
  1580.         dc.w    $223,$223,$223,$223
  1581.         dc.w    $223,$223,$223,$223
  1582. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1583.  
  1584. ;    -------------------------------------------------------------------
  1585. ;    --- Lesetext ausblenden ------------------------------------------
  1586. ;    -------------------------------------------------------------------
  1587.  AusBlendenText:
  1588.     lea    M_ColorsTextaus(pc),a0
  1589.     lea    M_ColorsTextausB(pc),a2
  1590.     
  1591.     AusA:
  1592.     cmp.b    #$a0,$dff006
  1593.     bne.s    AusA
  1594.     addq.l    #1,Blenden
  1595.     cmp.l    #8,Blenden
  1596.     blt.w    AusA
  1597.     lea    M_Colors(pc),a1        ; in Copperliste
  1598.     add.l    #2,a1            
  1599.     lea    M_Balken(pc),a3
  1600.     add.l    #2,a3
  1601.     move.l    #0,Blenden    
  1602.     move.w    #3,d7
  1603.     AendernAA:
  1604.     move.w    (a0)+,d0
  1605.     cmp.w    #-1,d0
  1606.     beq.s    FertigAA
  1607.     move.w    d0,(a1)
  1608.     add.l    #4,a1
  1609.  
  1610.     move.w    (a2)+,(a3)
  1611.     add.l    #8,a3    
  1612.  
  1613.     dbra    d7,AendernAA
  1614.     bra.s    AusA
  1615.   FertigAA:
  1616.     move.l    #0,Blenden
  1617.     rts
  1618.  
  1619. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1620. M_ColorsTextaus:            
  1621.         dc.w    $223,$eee,$aaa,$666    ;0ec 0d8 0b4
  1622.         dc.w    $223,$ccc,$888,$555
  1623.         dc.w    $112,$aaa,$666,$444
  1624.         dc.w    $112,$888,$555,$333
  1625.         dc.w    $111,$666,$444,$222
  1626.         dc.w    $001,$444,$333,$222
  1627.         dc.w    $000,$222,$222,$111
  1628.         dc.w    $000,$000,$000,$000
  1629.         dc.w    -1,-1,-1
  1630.  
  1631. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1632. M_ColorsTextausB:            
  1633.         dc.w    $223,$223,$223,$223
  1634.         dc.w    $223,$223,$223,$223
  1635.         dc.w    $112,$112,$112,$112
  1636.         dc.w    $112,$112,$112,$112
  1637.         dc.w    $111,$111,$111,$111
  1638.         dc.w    $001,$001,$001,$001
  1639.         dc.w    $000,$000,$000,$000
  1640.         dc.w    $000,$000,$000,$000
  1641.  
  1642.  
  1643. M_Abfrage:    
  1644.  
  1645.     move.b    $dff00a,d0
  1646.     cmp.b    #$4c,KeyCode        
  1647.     beq.w    M_Up
  1648.     cmp.b    #$4d,KeyCode        
  1649.     beq.w    M_Down
  1650.     move.b    Merky1,d1
  1651.     move.b    d0,MerkY1
  1652.     cmp.b    d0,d1
  1653.     beq.s    M_Rauf
  1654.     blt.s    M_Down
  1655.     bgt.w    M_Up
  1656.     M_Rauf:
  1657.     cmp.b    #$5f,KeyCode        
  1658.     beq.w    Waehlen
  1659.     move.b    #0,KeyCode
  1660.     btst    #6,$bfe001
  1661.     beq.w    Waehlen
  1662.     bra.w    Nicht_Menu
  1663. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1664. Waehlen:
  1665.     jsr    M_Gewaehlt
  1666.     bra.w    Nicht_Menu
  1667. M_Down:
  1668.     subq.l    #1,Delayer
  1669.     cmp.l    #1,Delayer
  1670.     bgt.s    M_Danach
  1671.  
  1672.     move.l    MerkEnde,d0
  1673.     add.l    #8800,d0
  1674.     sub.l    #13840,d0
  1675.     move.l    AddBitPl,d1
  1676.     cmp.l    d0,d1
  1677.     bgt.w    M_Danach
  1678.     add.l    #800,AddBitPl        ;
  1679.     move.l    #Screen,d0
  1680.     bsr    M_init_bitplanes
  1681.     
  1682.     bset    #0,SubAdd
  1683.     bsr.s    Suicid
  1684.     move.l    #15,Delayer
  1685.    M_Danach:
  1686.     bclr    #0,KeyFl
  1687.     move.b    #0,KeyCode
  1688.     bra.w    M_Rauf
  1689. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1690. Delayer:    dc.l    0
  1691. ;-------
  1692.  
  1693. M_Up:
  1694.     subq.l    #1,Delayer
  1695.     cmp.l    #1,Delayer
  1696.     bgt.s    M_DanachO
  1697.  
  1698.     cmp.l    #80,AddBitPl
  1699.     blt.w    M_DanachO
  1700.     sub.l    #800,AddBitPl        ;
  1701.     move.l    #Screen,d0
  1702.     bsr    M_init_bitplanes
  1703.     Nein:
  1704.  
  1705.     bclr    #0,SubAdd
  1706.     bsr.s    Suicid
  1707.     move.l    #15,Delayer
  1708.    M_DanachO:
  1709.     bclr    #0,KeyFl
  1710.     move.b    #0,KeyCode
  1711.     bra.w    M_Rauf
  1712.  
  1713. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1714. Suicid:
  1715.     lea    Hl_Name(pc),a0
  1716.         move.l    #0,d0
  1717.         move.l    #0,d1
  1718.         move.l    #0,d2
  1719.     move.b    6(a0),d0
  1720.     move.b    7(a0),d1
  1721.     move.b    8(a0),d2
  1722.     sub.b    #$30,d0
  1723.     sub.b    #$30,d1
  1724.     sub.b    #$30,d2
  1725.     
  1726.     mulu    #100,d0
  1727.     mulu    #10,d1
  1728.     add.l    d2,d0
  1729.     add.l    d1,d0
  1730.  
  1731.  
  1732.     btst    #0,SubAdd
  1733.     beq.s    S_Runter
  1734.     bne.w    S_Rauf
  1735.     rts
  1736.  
  1737.  
  1738.  
  1739. S_Runter:
  1740.  
  1741.     cmp.l    #1,d0
  1742.     beq.s    MessyUnten
  1743.     sub.l    #1,d0
  1744.  
  1745.     move.l    d0,d4
  1746.     divu    #10,d4
  1747.     swap    d4
  1748.     move.b    d4,8(a0)
  1749.     add.b    #$30,8(a0)
  1750.     swap    d4
  1751.     and.l    #$0000ffff,d4
  1752.     divu    #10,d4
  1753.     move.b    d4,6(a0)
  1754.     add.b    #$30,6(a0)
  1755.     swap    d4
  1756.     move.b    d4,7(a0)
  1757.     add.b    #$30,7(a0)
  1758.   Go_On2:    
  1759.     bsr.w    Artikel_Zahl
  1760.     rts
  1761.  
  1762. ;-----------------------------------
  1763.  
  1764. MessyUnten:
  1765.     move.l    #312,Welche
  1766.     jsr    Copy_Message
  1767. ;    move.w    #$0f0,$dff180
  1768.     bset    #0,NichtBL
  1769.     bra.s    Go_On2
  1770.  
  1771. ;===================================
  1772.  
  1773. S_Rauf:
  1774.     cmp.l    AnzArt,d0
  1775.     bgt.s    MessyOben
  1776.     add.l    #1,d0
  1777.    Init_Art:
  1778.     lea    Hl_Name(pc),a0
  1779.     move.l    d0,d4
  1780.     divu    #10,d4
  1781.     swap    d4
  1782.     move.b    d4,8(a0)
  1783.     add.b    #$30,8(a0)
  1784.     swap    d4
  1785.     and.l    #$0000ffff,d4
  1786.     divu    #10,d4
  1787.     move.b    d4,6(a0)
  1788.     add.b    #$30,6(a0)
  1789.     swap    d4
  1790.     move.b    d4,7(a0)
  1791.     add.b    #$30,7(a0)
  1792.   Go_On1:
  1793.     bsr.w    Artikel_Zahl
  1794.     rts
  1795.  
  1796. ;-----------------------------------
  1797.     
  1798. MessyOben:
  1799.     move.l    #312,Welche
  1800.     jsr    Copy_Message
  1801. ;    move.w    #$f00,$dff180
  1802.     bset    #0,NichtBL
  1803.     bra.s    Go_On1
  1804.  
  1805.  
  1806. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1807. Hl_Name:    dc.b    "Suicid000",0
  1808.         even
  1809. NichtBL:    dc.b 0
  1810.         even
  1811. ;øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø
  1812. TextCount:    dc.l 0
  1813. Position:    dc.l 0
  1814. ScreenOffset:    dc.l 0
  1815. AddBitPl:    dc.l 0
  1816. FontOffset2:    dc.l 0
  1817. MerkEnde:    dc.l 0
  1818. NameCounter:    dc.l 0
  1819. Schonfertig:    dc.b 0
  1820. Wahl:        dc.b 0
  1821. MenuUntenMaus:    dc.b 0
  1822.         even
  1823. ;øøøøøøøøøøøøøøøøøøøøøøøøøø
  1824.  
  1825. M_Init_Bitplanes:
  1826.     move.l    #M_BitPlanes,a0
  1827.     add.l    AddBitPl,d0
  1828.     move.w    #M_Planes-1,d7
  1829. M_GFX_Loop:
  1830.     add.l    #6,a0        ; $E2 zuerst
  1831.     move.w    d0,(a0)        ; Lo Wert
  1832.     sub.l    #4,a0        ; $e0 danach
  1833.     swap     d0        ; Swap
  1834.     move.w    d0,(a0)        ; High Wert
  1835.     add.l    #6,a0        ; In Copperliste weiter
  1836.     swap    d0        ; Swap
  1837.     add.l    #M_bs,d0        ; Eine Bitplanes dazu
  1838.     dbra    d7,M_GFX_Loop    ; Jump zurück
  1839.     rts            ; RTS
  1840.  
  1841. M_color1:
  1842.     move.w    #$180,d0            ; Wert der 1. Farbe
  1843.     move.l    #Fontend-M_farblaenge,a0    ; Adresse in Bilddaten
  1844.     move.l  #M_farbe,a1            ; Adresse in Copperliste
  1845. M_init:    move.w    (a0)+,d1            ; Farbcode 
  1846.     move.w    d0,(a1)+
  1847.     move.w    d1,(a1)+
  1848.     addq.w    #2,d0
  1849.     cmp.w    #$188,d0  ; $1a0 = 16F. || $190 = 8F.
  1850.     bne.s    M_init
  1851.     rts
  1852.  
  1853.  
  1854.  
  1855. ;    ----------------------------------------------------------------
  1856. ;    --- Abfrage der MausKoordinaten --------------------------------
  1857. ;    ----------------------------------------------------------------
  1858. Abfrage:
  1859.     cmp.w    #$8021,$dff00e
  1860.     beq.w    Keine_Kolli
  1861.  
  1862.     addq.l    #1,NSeite
  1863.  
  1864.     cmp.w    #241,SpriteY
  1865.     blt.w    AfterGd1
  1866.     cmp.w    #177,SpriteX        ; Runter        | 1
  1867.     blt.w    AfterGd1
  1868.     cmp.w    #206,SpriteX
  1869.     bgt.w    AfterGd1
  1870.     cmp.w    #271,SpriteY
  1871.     blt.w    Gedrueckt1
  1872.     AfterGd1:    
  1873.  
  1874.     cmp.w    #241,SpriteY
  1875.     blt.w    AfterGd2
  1876.     cmp.w    #217,SpriteX        ; Rauf            | 2
  1877.     blt.w    AfterGd2
  1878.     cmp.w    #246,SpriteX
  1879.     bgt.w    AfterGd2
  1880.     cmp.w    #271,SpriteY
  1881.     blt.w    Gedrueckt2
  1882.     AfterGd2:    
  1883.     
  1884.     cmp.w    #241,SpriteY
  1885.     blt.w    AfterGd3
  1886.     cmp.w    #257,SpriteX        ; 3 links        | 3
  1887.     blt.w    AfterGd3
  1888.     cmp.w    #286,SpriteX
  1889.     bgt.w    AfterGd3
  1890.     cmp.w    #271,SpriteY
  1891.     blt.w    Gedrueckt3
  1892.     AfterGd3:    
  1893.  
  1894.     cmp.w    #241,SpriteY
  1895.     blt.w    AfterGd4
  1896.     cmp.w    #297,SpriteX        ; 1links        | 4
  1897.     blt.w    AfterGd4
  1898.     cmp.w    #326,SpriteX
  1899.     bgt.w    AfterGd4
  1900.     cmp.w    #271,SpriteY
  1901.     blt.w    Gedrueckt4
  1902.     AfterGd4:    
  1903.  
  1904.     cmp.w    #241,SpriteY
  1905.     blt.w    AfterGd5
  1906.     cmp.w    #337,SpriteX        ; 1 rechts        | 5
  1907.     blt.s    AfterGd5
  1908.     cmp.w    #366,SpriteX
  1909.     bgt.w    AfterGd5
  1910.     cmp.w    #271,SpriteY
  1911.     blt.w    Gedrueckt5
  1912.     AfterGd5:    
  1913.  
  1914.     cmp.w    #241,SpriteY
  1915.     blt.w    AfterGd6
  1916.     cmp.w    #377,SpriteX        ; 3 rechts        | 6
  1917.     blt.s    AfterGd6
  1918.     cmp.w    #406,SpriteX
  1919.     bgt.w    AfterGd6
  1920.  
  1921.     cmp.w    #271,SpriteY
  1922.     blt.w    Gedrueckt6
  1923.     AfterGd6:    
  1924.  
  1925.     cmp.w    #241,SpriteY
  1926.     blt.w    AfterGd7
  1927.     cmp.w    #417,SpriteX        ; Menu             | 7
  1928.     blt.s    AfterGd7
  1929.     cmp.w    #447,SpriteX
  1930.     bgt.w    AfterGd7
  1931.     cmp.w    #271,SpriteY
  1932.     blt.w    Gedrueckt7
  1933.     AfterGd7:    
  1934.  
  1935.     cmp.w    #286,SpriteY        ; Exit
  1936.     blt.w    AfterGd8        
  1937.     cmp.w    #299,SpriteY        ; Exit
  1938.     bgt.w    AfterGd8        
  1939.     cmp.w    #150,SpriteX        
  1940.     blt.w    Gedrueckt8
  1941.     AfterGd8:
  1942.  
  1943.     cmp.w    #286,SpriteY        ; Music On 
  1944.     blt.w    AfterGd9        
  1945.     cmp.w    #299,SpriteY        
  1946.     bgt.w    AfterGd9        
  1947.     cmp.w    #397,SpriteX        
  1948.     blt.w    AfterGd9
  1949.     cmp.w    #419,SpriteX        
  1950.     blt.w    Gedrueckt9
  1951.     AfterGd9:
  1952.  
  1953.     cmp.w    #286,SpriteY        ; Music Off 
  1954.     blt.w    AfterGd10        
  1955.     cmp.w    #299,SpriteY        
  1956.     bgt.w    AfterGd10        
  1957.     cmp.w    #425,SpriteX        
  1958.     blt.w    AfterGd10
  1959.     cmp.w    #447,SpriteX        
  1960.     blt.w    Gedrueckt10
  1961.     AfterGd10:
  1962.     After:
  1963.  
  1964.     Keine_Kolli:
  1965.             rts
  1966.  
  1967.  
  1968. ;    ----------------------------------------------------------------
  1969. ;    --- Was passiert wenn MT auf Grafik gedrückt ? -----------------
  1970. ;    ----------------------------------------------------------------
  1971. Gedrueckt1:
  1972.     btst    #6,$bfe001
  1973.     bne.s    Back1
  1974.  
  1975.     move.l    #12,BobOffset
  1976.     bsr.w    Put
  1977.  
  1978.     move.l    #0,Welche
  1979.     bsr.w    Copy_Message
  1980.  
  1981.  
  1982.     bclr    #0,SubAdd
  1983.     bset    #0,MGd_G
  1984.     bset    #0,MenuUntenMaus
  1985.     jsr    Suicid
  1986.    Back1:
  1987.     bra.w    Keine_Kolli
  1988.  
  1989. ;    ------------------------------------
  1990.  
  1991. Gedrueckt2:
  1992.     btst    #6,$bfe001
  1993.     bne.w    Back2
  1994.  
  1995.     move.l    #22,BobOffset
  1996.     bsr.w    Put
  1997.  
  1998.     move.l    #24,Welche
  1999.     bsr.w    Copy_Message
  2000.  
  2001.     bset    #0,SubAdd
  2002.     bset    #0,MGd_G
  2003.     bset    #0,MenuUntenMaus
  2004.     jsr    Suicid
  2005.    Back2:
  2006.     bra.w    Keine_Kolli
  2007.  
  2008. ;    ------------------------------------
  2009.  
  2010. Gedrueckt3:
  2011.     btst    #6,$bfe001
  2012.     bne.s    Back3
  2013.  
  2014.     cmp.l    #10,NSeite
  2015.     blt.s    Back3
  2016.  
  2017.     move.l    #32,BobOffset
  2018.     bsr.w    Put
  2019.  
  2020.     move.l    #48,Welche
  2021.     bsr.w    Copy_Message
  2022.  
  2023.     move.l    AddBitPl,d0
  2024.     cmp.l    #16000,d0
  2025.     blt.s    GanzO
  2026.  
  2027.     sub.l    #16000,AddBitPl
  2028.     move.l    #Screen,d0
  2029.     bsr    M_init_bitplanes
  2030.  
  2031.     move.l    #0,NSeite        ; Wait
  2032.  
  2033.     Back3:
  2034.     bra.w    AfterGd3
  2035.  
  2036.     GanzO:
  2037.         move.l    #0,AddBitPl
  2038.         move.l    #Screen,d0
  2039.         bsr    M_init_bitplanes
  2040.         bra.s    Back3            
  2041.  
  2042. ;    ------------------------------------
  2043.  
  2044. Gedrueckt4:
  2045.     btst    #6,$bfe001
  2046.     bne.s    Back4
  2047.  
  2048.     move.l    #42,BobOffset
  2049.     bsr.w    Put
  2050.  
  2051.     move.l    #72,Welche
  2052.     bsr.w    Copy_Message
  2053.  
  2054.  
  2055.     move.l    AddBitPl,d0
  2056.     cmp.l    #1,d0
  2057.     blt.s    Comment4
  2058.  
  2059.     cmp.l    #0,AddBitPl
  2060.     blt.s    Back4
  2061.  
  2062.     sub.l    #400,AddBitPl
  2063.     move.l    #Screen,d0
  2064.     bsr    M_init_bitplanes
  2065.  
  2066.     Back4:
  2067.     bra.w    AfterGd4
  2068.         
  2069. Comment4:
  2070.     move.l    #336,Welche
  2071.     bsr.w    Copy_Message
  2072.     move.l    #00,AddBitPl
  2073.     move.l    #Screen,d0
  2074.     bsr    M_init_bitplanes
  2075.     bra.s    Back4
  2076. ;    ------------------------------------
  2077.  
  2078. Gedrueckt5:        
  2079.     btst    #6,$bfe001
  2080.     bne.s    Back5
  2081.  
  2082.     move.l    #52,BobOffset
  2083.     bsr.w    Put
  2084.  
  2085.     move.l    #96,Welche
  2086.     bsr.w    Copy_Message
  2087.  
  2088.  
  2089.     move.l    AddBitPl,d0
  2090.     move.l    MerkEnde,d1
  2091.     sub.l    #16000,d1
  2092.     cmp.l    d1,d0
  2093.     bgt.s    Comment5
  2094.  
  2095.     add.l    #400,AddBitPl
  2096.     move.l    #Screen,d0
  2097.     bsr    M_init_bitplanes
  2098.     
  2099.     Back5:
  2100.     bra.w    AfterGd5
  2101.  
  2102. Comment5:
  2103.     move.l    #360,Welche
  2104.     bsr.w    Copy_Message
  2105.     bra.s    Back5
  2106.         
  2107. ;    ------------------------------------
  2108.  
  2109. Gedrueckt6:            
  2110.     btst    #6,$bfe001
  2111.     bne.s    Back6
  2112.  
  2113.     cmp.l    #10,NSeite
  2114.     blt.s    Back6
  2115.  
  2116.     move.l    #62,BobOffset
  2117.     bsr.w    Put
  2118.  
  2119.     move.l    #120,Welche
  2120.     bsr.w    Copy_Message
  2121.  
  2122.  
  2123.  
  2124.     move.l    MerkEnde,d0
  2125.     cmp.l    #16000,d0
  2126.     blt.s    Back6
  2127.  
  2128.  
  2129.     move.l    AddBitPl,d0
  2130.     move.l    MerkEnde,d1
  2131.     sub.l    #32000,d1
  2132.     cmp.l    d1,d0
  2133.     bgt.s    GanzU
  2134.  
  2135.  
  2136.     add.l    #16000,AddBitPl
  2137.     move.l    #Screen,d0
  2138.     bsr    M_init_bitplanes
  2139.  
  2140.     move.l    #0,NSeite
  2141.  
  2142.     Back6:
  2143.     bra.w    AfterGd6
  2144.  
  2145.     GanzU:
  2146.         move.l    MerkEnde,d0
  2147.         sub.l    #15600,d0
  2148.         move.l    d0,AddBitPl
  2149.         move.l    #Screen,d0
  2150.         bsr    M_init_bitplanes
  2151. ;        add.l    #40,AddBitPl
  2152.         bra.s    Back6            
  2153.         
  2154. ;    ------------------------------------
  2155.  
  2156. Gedrueckt7:                ; Menu
  2157.     btst    #6,$bfe001
  2158.     bne.w    Back7
  2159.  
  2160.     move.l    #72,BobOffset
  2161.     bsr.w    Put
  2162.  
  2163.     move.l    #144,Welche
  2164.     bsr.w    Copy_Message
  2165.  
  2166.     bset    #1,MGd_G
  2167.     bset    #0,MenuUntenMaus
  2168.  
  2169.     move.l    #1,d0
  2170.     bsr.w    Init_Art
  2171.  
  2172.     Back7:
  2173.     bra.w    Keine_Kolli
  2174.  
  2175. ;---------------------------------------------------
  2176. ;--- Wenn MENU Gadget gedrückt wird ----------------
  2177. ;---------------------------------------------------
  2178. Make_Menu:
  2179.  
  2180.     bsr.w    AusblendenText
  2181.  
  2182.     movem.l    d0-d7/a0-a6,-(a7)
  2183.         jsr    ClearScreen
  2184.     move.l    #Text,Source
  2185.     move.l    #Screen,Destin
  2186.     add.l    #1920,Destin
  2187.         jsr    Write
  2188.     movem.l    (a7)+,d0-d7/a0-a6
  2189.  
  2190.     move.l    #00,AddBitPl
  2191.     move.l    #Screen,d0
  2192.     bsr    M_init_bitplanes
  2193.  
  2194.     bsr.w    Einblenden
  2195.     bclr    #0,Wahl            ; Abfrage des Bitplanescrollings
  2196.                     ; aktivieren
  2197.     bset    #0,MenuUntenMaus    ; Mausabfrage unten ausschalten
  2198.     move.l    #0,NameCounter
  2199.     bclr    #1,MGd_G
  2200.     
  2201.     rts
  2202.  
  2203. ;    ------------------------------------
  2204.  
  2205. Gedrueckt8:            
  2206.     btst    #6,$bfe001
  2207.     bne.s    Back8
  2208.  
  2209.     bset    #0,MenuUntenMaus    ; Maus sperren
  2210.  
  2211.     move.l    #168,Welche
  2212.     bsr.w    Copy_Message
  2213.  
  2214.     move.l    #0,d0
  2215.     move.l    #0,d1
  2216.  
  2217.     bset    #0,Aussteigen
  2218.  
  2219.     Back8:
  2220.     bra.w    AfterGd8
  2221.  
  2222. ;    ------------------------------------
  2223.  
  2224. Gedrueckt9:        
  2225.     btst    #6,$bfe001
  2226.     bne.s    Back9
  2227.     
  2228.     move.l    #0,OnOff
  2229.     bsr.w    Put_Music
  2230.     bclr    #0,Ismusic
  2231.  
  2232.     move.l    #192,Welche
  2233.     bsr.w    Copy_Message
  2234.  
  2235.     Back9:
  2236.     bra.w    AfterGd9
  2237.  
  2238. ;    ------------------------------------
  2239.  
  2240. Gedrueckt10:        
  2241.     btst    #6,$bfe001
  2242.     bne.s    Back10
  2243.  
  2244.     move.l    #224,OnOff
  2245.     bsr.w    Put_Music
  2246.     bset    #0,Ismusic
  2247.  
  2248.     move.l    #216,Welche
  2249.     bsr.w    Copy_Message
  2250.  
  2251.     movem.l    d0-d7/a0-a6,-(a7)
  2252.     jsr    mt_end
  2253.     movem.l    (a7)+,d0-d7/a0-a6
  2254.         
  2255.     Back10:
  2256.     bra.w    AfterGd10
  2257.  
  2258. ;    ----------------------------------------------------------------
  2259. BobOffset:    dc.l 0
  2260. Welche:        dc.l 0
  2261. Messy_Rein:    dc.l 0
  2262. Aussteigen:    dc.b 0
  2263. IsMusic:    dc.b 0    
  2264.         even    
  2265.  
  2266. ;    ----------------------------------------------------------------
  2267. ;    ----------------------------------------------------------------
  2268. ;    ----------------------------------------------------------------
  2269.  
  2270. Copy_Message:
  2271.     move.l    #0,Messy_Rein
  2272.     lea    Menu,a0
  2273.     add.l    #4171,a0
  2274.     lea    Font2,a1
  2275.     lea    Messages(pc),a2
  2276.     add.l    Welche,a2
  2277.     move.w    #23,d7
  2278.  
  2279. Gosh:
  2280.     move.l    #0,d0
  2281.     move.b    (a2)+,d0
  2282.     cmp.b    #32,d0
  2283.     beq.s    Leer
  2284.     AFterLeer:
  2285.     sub.l    #33,d0
  2286.     add.l    d0,a1
  2287.     bsr.w    Copy_Zahl
  2288.     lea    Menu,a0
  2289.     add.l    #4171,a0
  2290.     addq.l    #1,Messy_Rein
  2291.     add.l    Messy_Rein,a0
  2292.     lea    Font2,a1
  2293.     dbra    d7,Gosh
  2294.     rts
  2295.  
  2296. Leer:
  2297.     move.l    #94,d0
  2298.     bra.s    AfterLeer
  2299.  
  2300. Messages:
  2301.     dc.b    "Hello! I am Derrel.     "
  2302.     dc.b    "Cool it man.            "
  2303.     dc.b    "Alcohol is our petrol!  "
  2304.     dc.b    "Want new stuff eh ?     "
  2305.     dc.b    "You re going down!      "
  2306.     dc.b    "Beer is our elixier!    "
  2307.     dc.b    "I like this menu !!!    "
  2308.     dc.b    "SUCKER, LOOSER,...!!!!!!"
  2309.     dc.b    "Nice music, isn`t it?   "
  2310.     dc.b    "Don`t turn it off !!!   "
  2311.     dc.b    "Loading OK.             "    ; Messages + 240
  2312.     dc.b    "DISK ERROR!             "    ; Messages + 264
  2313.     dc.b    "Enjoy reading !!!       "      ; Messages + 288
  2314.     dc.b    "There`s no article left!"    ; Messages + 312
  2315.     dc.b    "Fuck off, looser !!!    "    ; Messages + 336
  2316.     dc.b    "Didn`t ya check the end?"    ; Messages + 360
  2317.     dc.b    " ",0    
  2318.     even
  2319. ;    ----------------------------------------------------------------
  2320. ;    --- Grafik über Position des MPoiner blitten -------------------
  2321. ;    ----------------------------------------------------------------
  2322. Put:
  2323.     lea    $dff000,a6
  2324.     lea    Drueber,a0
  2325.     lea    Menu,a1
  2326.     add.l    #240,a1
  2327.     add.l    BobOffset,a1
  2328.     sub.l    #12,BobOffset
  2329.     add.l    BobOffset,a0
  2330.     move.w    #3,d7
  2331.     
  2332. Wait:
  2333.     btst    #14,dmaconr(a6)
  2334.     bne.s    Wait
  2335.  
  2336.     move.l    #$ffffffff,bltafwm(a6)
  2337.     move.w    #62,bltamod(a6)
  2338.     move.w    #72,bltdmod(a6)
  2339.  
  2340. Go_on:    
  2341.     move.l    a0,bltapth(a6)
  2342.     move.l    a1,bltdpth(a6)
  2343.     clr.w    bltcon1(a6)
  2344.     move.w    #$09f0,bltcon0(a6)
  2345.     move.w    #32*64+4,bltsize(a6)
  2346.  
  2347. Wait2:
  2348.     btst    #14,dmaconr(a6)
  2349.     bne.s    Wait2
  2350.  
  2351.     add.l    #2240,a0
  2352.     add.l    #bs,a1
  2353.     dbra    d7,Go_on    
  2354.     rts        
  2355.  
  2356. ;    ----------------------------------------------------------------
  2357. ;    --- Textscreen löschen -----------------------------------------
  2358. ;    ----------------------------------------------------------------
  2359. ClearScreen:
  2360.     lea    Screen,a0
  2361.     lea    $dff000,a6
  2362.     move.w    #1,d7
  2363.     move.l    #$ffffffff,bltafwm(a6)
  2364.     move.w    #0,bltdmod(a6)
  2365.  CS:
  2366.      move.l    a0,bltdpth(a6)
  2367.      clr.w    bltcon1(a6)
  2368.      move.w    #$0100,bltcon0(a6)    
  2369.     move.w    #1000*64+40,bltsize(a6)
  2370. WaitCS:
  2371.     btst    #14,dmaconr(a6)
  2372.     bne.s    WaitCS
  2373.  
  2374.     add.l    #M_bs,a0
  2375.     dbra    d7,CS
  2376. ;--------------------------------------
  2377.     lea    Screen,a0
  2378.     add.l    #80000,a0
  2379.     lea    $dff000,a6
  2380.     move.w    #1,d7
  2381.     move.l    #$ffffffff,bltafwm(a6)
  2382.     move.w    #0,bltdmod(a6)
  2383.  CS1:
  2384.      move.l    a0,bltdpth(a6)
  2385.      clr.w    bltcon1(a6)
  2386.      move.w    #$0100,bltcon0(a6)    
  2387.     move.w    #200*64+40,bltsize(a6)
  2388. WaitCS1:
  2389.     btst    #14,dmaconr(a6)
  2390.     bne.s    WaitCS1
  2391.  
  2392.     add.l    #M_bs,a0
  2393.     dbra    d7,CS1
  2394.     rts
  2395.  
  2396.  
  2397. ;    ----------------------------------------------------------------
  2398. ;    --- Jedes Interrupt Kopie der Menugrafik in Screen blitten -----
  2399. ;    ----------------------------------------------------------------
  2400. Restaurieren:
  2401.     lea    $dff000,a6
  2402.     lea    SaveMenu,a0
  2403.     lea    Menu,a1
  2404.     add.l    #252,a1
  2405.     add.l    #252,a0
  2406.     move.w    #3,d7
  2407.     
  2408. Wait5:
  2409.     btst    #14,dmaconr(a6)
  2410.     bne.s    Wait5
  2411.  
  2412.     move.l    #$ffffffff,bltafwm(a6)
  2413.     move.w    #12,bltamod(a6)
  2414.     move.w    #12,bltdmod(a6)
  2415.  
  2416. Gon_on2:    
  2417.     move.l    a0,bltapth(a6)
  2418.     move.l    a1,bltdpth(a6)
  2419.     clr.w    bltcon1(a6)
  2420.     move.w    #$09f0,bltcon0(a6)
  2421.     move.w    #32*64+34,bltsize(a6)
  2422.  
  2423. Wait6:
  2424.     btst    #14,dmaconr(a6)
  2425.     bne.s    Wait6
  2426.  
  2427.     add.l    #bs,a0
  2428.     add.l    #bs,a1
  2429.     dbra    d7,Gon_on2    
  2430.     rts        
  2431. ;    ----------------------------------------------------------------
  2432. OnOff:    dc.l 0
  2433. ;    ----------------------------------------------------------------
  2434.  
  2435.  
  2436.  
  2437. ;    ----------------------------------------------------------------
  2438. ;    --- Music on/off toggle hinblitten -----------------------------
  2439. ;    ----------------------------------------------------------------
  2440. Put_Music:
  2441.     lea    $dff000,a6
  2442.     lea    Music,a0
  2443.     add.l    OnOff,a0
  2444.     lea    Menu,a1
  2445.     add.l    #66,a1
  2446.     add.l    #3600,a1
  2447.     add.l    #240,a1
  2448.     move.w    #3,d7
  2449.     
  2450. Waitm:
  2451.     btst    #14,dmaconr(a6)
  2452.     bne.s    Waitm
  2453.  
  2454.     move.l    #$ffffffff,bltafwm(a6)
  2455.     move.w    #0,bltamod(a6)
  2456.     move.w    #66,bltdmod(a6)
  2457.  
  2458. Go_onm:    
  2459.     move.l    a0,bltapth(a6)
  2460.     move.l    a1,bltdpth(a6)
  2461.     clr.w    bltcon1(a6)
  2462.     move.w    #$09f0,bltcon0(a6)
  2463.     move.w    #16*64+7,bltsize(a6)
  2464.  
  2465. Wait2m:
  2466.     btst    #14,dmaconr(a6)
  2467.     bne.s    Wait2m
  2468.  
  2469.     add.l    #448,a0
  2470.     add.l    #bs,a1
  2471.     dbra    d7,Go_onm    
  2472.     rts        
  2473.     
  2474. ;    ----------------------------------------------------------------
  2475.     SpriteY:    dc.w 0
  2476.     SpriteX:    dc.w 0    
  2477.     Pointset:    dc.l 12040
  2478.     even
  2479.  
  2480.  
  2481.  
  2482. ;    ----------------------------------------------------------------
  2483. ;    --- Sprite-Mausabfrage -----------------------------------------
  2484. ;    ----------------------------------------------------------------
  2485. D_Mausabfrage:
  2486. ;    -------------------------------
  2487. ;    --- Rechts & Links ------------
  2488. ;    -------------------------------
  2489.     move.l    #0,d0
  2490.     move.w    $dff00a,d0
  2491.  
  2492.     move.b    MerkX,d1
  2493.     move.b    d0,MerkX
  2494.  
  2495.     cmp.b    d0,d1
  2496.     blt.s    Rechts
  2497.     bgt.s    Links
  2498.    AfterRL:
  2499.  
  2500.  
  2501. ;    -------------------------------
  2502. ;    --- Oben & Unten --------------
  2503. ;    -------------------------------
  2504.     move.b    $dff00a,d0
  2505.  
  2506.     move.b    MerkY,d1
  2507.     move.b    d0,MerkY
  2508.  
  2509.     cmp.b    d0,d1
  2510.     bgt.w    Oben    
  2511.     blt.s    Unten
  2512.     AfterOU:
  2513.  
  2514.     rts
  2515. ;-------------------------------
  2516. MerkX:    dc.b 0
  2517. MerkY:    dc.b 0
  2518. MerkY1:    dc.b 0
  2519.     even
  2520. ;-------------------------------
  2521.  
  2522. Oben:
  2523.         cmp.w    #237,SpriteY
  2524.         blt.s    Nix1
  2525.         sub.w    #1,SpriteY
  2526.     Nix1:
  2527.         bsr.s    Put_Sprite
  2528.         bra.s    AfterOU
  2529.  
  2530. Unten:
  2531.         cmp.w    #299,SpriteY
  2532.         bgt.s    Nix2
  2533.         add.w    #1,SpriteY
  2534.     Nix2:
  2535.         bsr.s    Put_Sprite
  2536.         bra.s    AfterOU
  2537.  
  2538. Rechts:
  2539.         cmp.w    #446,SpriteX
  2540.         bgt.s    Nix3    
  2541.         add.w    #1,SpriteX
  2542.     Nix3:
  2543.         bsr.s    Put_Sprite
  2544.         bra.s    AfterRL
  2545.  
  2546. Links:
  2547.         cmp.w    #129,SpriteX
  2548.         blt.s    Nix4    
  2549.         sub.w    #1,SpriteX
  2550.     Nix4:
  2551.         bsr.s    Put_Sprite
  2552.         bra.s    AfterRL
  2553.  
  2554.  
  2555.  
  2556. ;    -------------------------------------------------------------------
  2557. ;    --- Spritekoordinaten initialisieren ------------------------------
  2558. ;    -------------------------------------------------------------------
  2559. Put_Sprite:
  2560.     move.w    SpriteX,d0
  2561.     move.w    SpriteY,d1
  2562.     move.w    d1,d2
  2563.     add.w    #16,d2
  2564.     lea    SpriteData(pc),a0
  2565.     move.b    d1,(a0)
  2566.     ror.w    #1,d0
  2567.     move.b    d0,1(a0)
  2568.     move.b    d2,2(a0)
  2569.     rol.w    #1,d0
  2570.     and.b    #1,d0
  2571.  
  2572.     btst    #8,d1
  2573.     beq.s    Nicht_Erste
  2574.     bset    #2,d0
  2575.     Nicht_Erste:
  2576.     btst    #8,d2
  2577.     beq.s    Nicht_Zweite
  2578.     bset    #1,d0
  2579.     Nicht_Zweite:
  2580.     move.b    d0,3(a0)
  2581.     rts
  2582.  
  2583.  
  2584.  
  2585. ;    ----------------------------------------------------------------
  2586. ;    --- Was ist das wohl ? -----------------------------------------
  2587. ;    ----------------------------------------------------------------
  2588.  
  2589. Copperliste:
  2590.     dc.w    $180,$000
  2591. ;    ----------------------------------------------------------------
  2592.  
  2593. Sprites:
  2594.     dc.w    $120,0,$122,0,$124,0,$126,0,$128,0,$12a,0,$12c,0,$12e,0
  2595.     dc.w    $130,0,$132,0,$134,0,$136,0,$138,0,$13a,0,$13c,0,$13e,0
  2596.  
  2597. ;    ----------------------------------------------------------------
  2598.     dc.w    $1d07,-2
  2599.     dc.w    $180,$008
  2600.  
  2601.  
  2602.     dc.w    $2007,-2
  2603. M_BitPlanes:
  2604.     dc.w    $e0,0,$e2,0    ; 1 Plane
  2605.     dc.w    $e4,0,$e6,0    ; 2 Planes
  2606. ;    dc.w    $e8,0,$ea,0    ; 3 Planes
  2607. ;    dc.w    $ec,0,$ee,0    ; 4 Planes
  2608. ;    dc.w    $f0,0,$f2,0    ; 5 Planes
  2609. ;    --------------------------------------------------
  2610.     dc.w    $8e,$2081,$90,$e7c1,$92,$3c,$94,$d4  ;Spezialreg.
  2611.     dc.w    $108,0,$10a,0 
  2612.     dc.w     $100,$a200        ; bplcon0
  2613.  
  2614.  
  2615. M_Colors:
  2616.     dc.w    $180,000,$182,000,$184,000,$186,000
  2617.             
  2618.  
  2619.     dc.w    $6e07,-2
  2620. M_Balken:
  2621.     dc.w    $180,$0
  2622.     dc.w    $6f07,-2
  2623.     dc.w    $180,$0
  2624.     dc.w    $7907,-2
  2625.     dc.w    $180,$0
  2626.     dc.w    $7a07,-2
  2627.     dc.w    $180,$0
  2628.  
  2629. ;    -------------------------------------------------------------------
  2630.  
  2631. ;    dc.w    $e607,-2                
  2632. ;    dc.w    $180,$004    ;,$182,$0ca,$184,$0b6,$188,$093
  2633. ;    dc.w    $e707,-2                
  2634. ;    dc.w    $180,$003    ;,$182,$0b9,$184,$0a5,$188,$082
  2635. ;    dc.w    $e807,-2                
  2636. ;    dc.w    $180,$002    ;,$182,$0a8,$184,$094,$188,$072
  2637. ;    dc.w    $e907,-2                    
  2638. ;    dc.w    $180,$001    ;,$182,$064,$184,$050,$188,$030
  2639. ;    dc.w    $ea07,-2        
  2640. ;    dc.w    $180,$000    ;,$182,$042,$184,$030,$188,$010
  2641.  
  2642.     dc.w    $e807,-2
  2643. ;    dc.w    $180,$008
  2644.  
  2645. ;    -------------------------------------------------------------------
  2646.     dc.w    $eb07,-2
  2647. BitPlanes:    
  2648.     dc.w    $e0,0,$e2,0    ; 1 Plane
  2649.     dc.w    $e4,0,$e6,0    ; 2 Planes
  2650.     dc.w    $e8,0,$ea,0    ; 3 Planes
  2651.     dc.w    $ec,0,$ee,0    ; 4 Planes
  2652. ;    dc.w    $f0,0,$f2,0    ; 5 Planes
  2653. ;    --------------------------------------------------
  2654. Farbe:
  2655.     blk.w    32,0    
  2656. ;    --------------------------------------------------
  2657.     dc.w    $8e,$ec81,$90,$2fc1,$92,$3c,$94,$d4  ;Spezialreg.
  2658.     dc.w    $108,0,$10a,0 
  2659.     dc.w     $100,$C200        ; bplcon0
  2660.     dc.w    $180,0
  2661.     dc.w    $102,$00
  2662.  
  2663.     dc.w    $1a0,$000
  2664.     dc.w    $1a2,$00a
  2665.     dc.w    $1a4,$006
  2666.     dc.w    $1a6,$00f
  2667.     
  2668.  
  2669.     dc.w    $ffe1,-2
  2670.  
  2671.     dc.w    $2007,-2
  2672.     dc.w    $180,$000    
  2673.     dc.w    $182,$bbb    
  2674.  
  2675.  
  2676.  
  2677.     dc.w    $ffff,-2
  2678.  
  2679.  
  2680. ;    -------------------------------------------------------------------
  2681. M_Farbe:
  2682.     blk.w    8,0    
  2683. ;    -------------------------------------------------------------------
  2684.  
  2685.  
  2686. ;    -------------------------------------------------------------------
  2687. ;    --- Bitplanes des Mauspointers ------------------------------------
  2688. ;    -------------------------------------------------------------------
  2689. SpriteData:
  2690.     dc.w    $a05a,$b000
  2691.     dc.w    %1111111111111111,%1111111111111111
  2692.     dc.w    %0111111111111110,%1000000000000000
  2693.     dc.w    %0111111111111100,%1000000000000000
  2694.     dc.w    %0111111111111000,%1000000000000000        
  2695.     dc.w    %0111111111110000,%1000000000000000            
  2696.     dc.w    %0111111111100000,%1000000000100000        
  2697.     dc.w    %0111111111110000,%1000000000010000
  2698.     dc.w    %0111111111111000,%1000000000001000    
  2699.     dc.w    %0111111111111100,%1000000000000100
  2700.     dc.w    %0111111111111100,%1000000000000000    
  2701.     dc.w    %0111101111111000,%1000010000000000    
  2702.     dc.w    %0111100111110000,%1000001000000000        
  2703.     dc.w    %0111000011100000,%1000000100000000        
  2704.     dc.w    %0110000001000000,%1000000010000000
  2705.     dc.w    %0100000000000000,%1000000000000000
  2706.     dc.w    %0000000000000000,%0000000000000000
  2707.     dc.w    0,0
  2708.  
  2709.  
  2710.  
  2711. ;    -------------------------------------------------------------------
  2712. ;    --- Screen in Copperliste eintragen -------------------------------
  2713. ;    -------------------------------------------------------------------
  2714. Init_Bitplanes:
  2715.     move.l    #BitPlanes,a0
  2716.     move.l    #Menu,d0
  2717.     move.w    #Planes-1,d7
  2718. GFX_Loop:
  2719.     add.l    #6,a0        ; $E2 zuerst
  2720.     move.w    d0,(a0)        ; Lo Wert
  2721.     sub.l    #4,a0        ; $e0 danach
  2722.     swap     d0        ; Swap
  2723.     move.w    d0,(a0)        ; High Wert
  2724.     add.l    #6,a0        ; In Copperliste weiter
  2725.     swap    d0        ; Swap
  2726.     add.l    #bs,d0        ; Eine Bitplanes dazu
  2727.     dbra    d7,GFX_Loop    ; Jump zurück
  2728.     rts            ; RTS
  2729.  
  2730.  
  2731.  
  2732. ;    -------------------------------------------------------------------
  2733. ;    --- Farben initialisieren -----------------------------------------
  2734. ;    -------------------------------------------------------------------
  2735. color1:
  2736.     move.w    #$180,d0            ; Wert der 1. Farbe
  2737.     move.l    #MenuEnd-farblaenge,a0    ; Adresse in Bilddaten
  2738.     move.l  #farbe,a1            ; Adresse in Copperliste
  2739. init:    move.w    (a0)+,d1            ; Farbcode 
  2740.     move.w    d0,(a1)+
  2741.     move.w    d1,(a1)+
  2742.     addq.w    #2,d0
  2743.     cmp.w    #$1a0,d0  ; $1a0 = 16F. || $190 = 8F.
  2744.     bne.s    init
  2745.     rts
  2746.  
  2747.     even
  2748. ;-------------------------------------------
  2749. ;----- Soundtracker V2.4 - playroutine -----
  2750. ;-------------------------------------------
  2751. ; call 'mt_init' to initialize the playroutine
  2752.  
  2753. mt_init:lea    mt_data,a0
  2754.     add.l    #$03b8,a0
  2755.     moveq    #$7f,d0
  2756.     moveq    #0,d1
  2757. mt_init1:
  2758.     move.l    d1,d2
  2759.     subq.w    #1,d0
  2760. mt_init2:
  2761.     move.b    (a0)+,d1
  2762.     cmp.b    d2,d1
  2763.     bgt.s    mt_init1
  2764.     dbf    d0,mt_init2
  2765.     addq.b    #1,d2
  2766.  
  2767. mt_init3:
  2768.     lea    mt_data,a0
  2769.     lea    mt_sample1(pc),a1
  2770.     asl.l    #8,d2
  2771.     asl.l    #2,d2
  2772.     add.l    #$438,d2
  2773.     add.l    a0,d2
  2774.     moveq    #$1e,d0
  2775. mt_init4:
  2776.     move.l    d2,(a1)+
  2777.     moveq    #0,d1
  2778.     move.w    42(a0),d1
  2779.     asl.l    #1,d1
  2780.     add.l    d1,d2
  2781.     add.l    #$1e,a0
  2782.     dbf    d0,mt_init4
  2783.  
  2784.     lea    mt_sample1(PC),a0
  2785.     moveq    #0,d0
  2786. mt_clear:
  2787.     move.l    (a0,d0.w),a1
  2788.     clr.l    (a1)
  2789.     addq.w    #4,d0
  2790.     cmp.w    #$7c,d0
  2791.     bne.s    mt_clear
  2792.  
  2793.     clr.w    $dff0a8
  2794.     clr.w    $dff0b8
  2795.     clr.w    $dff0c8
  2796.     clr.w    $dff0d8
  2797.     clr.l    mt_partnrplay
  2798.     clr.l    mt_partnote
  2799.     clr.l    mt_partpoint
  2800.  
  2801.     move.b    mt_data+$3b6,mt_maxpart+1
  2802.     rts
  2803.  
  2804. ; call 'mt_end' to switch the sound off
  2805.  
  2806. mt_end:    clr.w    $dff0a8
  2807.     clr.w    $dff0b8
  2808.     clr.w    $dff0c8
  2809.     clr.w    $dff0d8
  2810.     move.w    #$f,$dff096
  2811.     rts
  2812.  
  2813. ; the playroutine - call this every frame
  2814.  
  2815. mt_music:
  2816.     addq.w    #1,mt_counter
  2817. mt_cool:cmp.w    #6,mt_counter
  2818.     bne.s    mt_notsix
  2819.     clr.w    mt_counter
  2820.     bra    mt_rout2
  2821.  
  2822. mt_notsix:
  2823.     lea    mt_aud1temp(PC),a6
  2824.     tst.b    3(a6)
  2825.     beq.s    mt_arp1
  2826.     lea    $dff0a0,a5        
  2827.     bsr.s    mt_arprout
  2828. mt_arp1:lea    mt_aud2temp(PC),a6
  2829.     tst.b    3(a6)
  2830.     beq.s    mt_arp2
  2831.     lea    $dff0b0,a5
  2832.     bsr.s    mt_arprout
  2833. mt_arp2:lea    mt_aud3temp(PC),a6
  2834.     tst.b    3(a6)
  2835.     beq.s    mt_arp3
  2836.     lea    $dff0c0,a5
  2837.     bsr.s    mt_arprout
  2838. mt_arp3:lea    mt_aud4temp(PC),a6
  2839.     tst.b    3(a6)
  2840.     beq.s    mt_arp4
  2841.     lea    $dff0d0,a5
  2842.     bra.s    mt_arprout
  2843. mt_arp4:rts
  2844.  
  2845. mt_arprout:
  2846.     move.b    2(a6),d0
  2847.     and.b    #$0f,d0
  2848.     tst.b    d0
  2849.     beq    mt_arpegrt
  2850.     cmp.b    #$01,d0
  2851.     beq.s    mt_portup
  2852.     cmp.b    #$02,d0
  2853.     beq.s    mt_portdwn
  2854.     cmp.b    #$0a,d0
  2855.     beq.s    mt_volslide
  2856.     rts
  2857.  
  2858. mt_portup:
  2859.     moveq    #0,d0
  2860.     move.b    3(a6),d0
  2861.     sub.w    d0,22(a6)
  2862.     cmp.w    #$71,22(a6)
  2863.     bpl.s    mt_ok1
  2864.     move.w    #$71,22(a6)
  2865. mt_ok1:    move.w    22(a6),6(a5)
  2866.     rts
  2867.  
  2868. mt_portdwn:
  2869.     moveq    #0,d0
  2870.     move.b    3(a6),d0
  2871.     add.w    d0,22(a6)
  2872.     cmp.w    #$538,22(a6)
  2873.     bmi.s    mt_ok2
  2874.     move.w    #$538,22(a6)
  2875. mt_ok2:    move.w    22(a6),6(a5)
  2876.     rts
  2877.  
  2878. mt_volslide:
  2879.     moveq    #0,d0
  2880.     move.b    3(a6),d0
  2881.     lsr.b    #4,d0
  2882.     tst.b    d0
  2883.     beq.s    mt_voldwn
  2884.     add.w    d0,18(a6)
  2885.     cmp.w    #64,18(a6)
  2886.     bmi.s    mt_ok3
  2887.     move.w    #64,18(a6)
  2888. mt_ok3:    move.w    18(a6),8(a5)
  2889.     rts
  2890. mt_voldwn:
  2891.     moveq    #0,d0
  2892.     move.b    3(a6),d0
  2893.     and.b    #$0f,d0
  2894.     sub.w    d0,18(a6)
  2895.     bpl.s    mt_ok4
  2896.     clr.w    18(a6)
  2897. mt_ok4:    move.w    18(a6),8(a5)
  2898.     rts
  2899.  
  2900. mt_arpegrt:
  2901.     move.w    mt_counter(PC),d0
  2902.     cmp.w    #1,d0
  2903.     beq.s    mt_loop2
  2904.     cmp.w    #2,d0
  2905.     beq.s    mt_loop3
  2906.     cmp.w    #3,d0
  2907.     beq.s    mt_loop4
  2908.     cmp.w    #4,d0
  2909.     beq.s    mt_loop2
  2910.     cmp.w    #5,d0
  2911.     beq.s    mt_loop3
  2912.     rts
  2913.  
  2914. mt_loop2:
  2915.     moveq    #0,d0
  2916.     move.b    3(a6),d0
  2917.     lsr.b    #4,d0
  2918.     bra.s    mt_cont
  2919. mt_loop3:
  2920.     moveq    #$00,d0
  2921.     move.b    3(a6),d0
  2922.     and.b    #$0f,d0
  2923.     bra.s    mt_cont
  2924. mt_loop4:
  2925.     move.w    16(a6),d2
  2926.     bra.s    mt_endpart
  2927. mt_cont:
  2928.     add.w    d0,d0
  2929.     moveq    #0,d1
  2930.     move.w    16(a6),d1
  2931.     and.w    #$fff,d1
  2932.     lea    mt_arpeggio(PC),a0
  2933. mt_loop5:
  2934.     move.w    (a0,d0),d2
  2935.     cmp.w    (a0),d1
  2936.     beq.s    mt_endpart
  2937.     addq.l    #2,a0
  2938.     bra.s    mt_loop5
  2939. mt_endpart:
  2940.     move.w    d2,6(a5)
  2941.     rts
  2942.  
  2943. mt_rout2:
  2944.     lea    mt_data,a0
  2945.     move.l    a0,a3
  2946.     add.l    #$0c,a3
  2947.     move.l    a0,a2
  2948.     add.l    #$3b8,a2
  2949.     add.l    #$43c,a0
  2950.     move.l    mt_partnrplay(PC),d0
  2951.     moveq    #0,d1
  2952.     move.b    (a2,d0),d1
  2953.     asl.l    #8,d1
  2954.     asl.l    #2,d1
  2955.     add.l    mt_partnote(PC),d1
  2956.     move.l    d1,mt_partpoint
  2957.     clr.w    mt_dmacon
  2958.  
  2959.     lea    $dff0a0,a5
  2960.     lea    mt_aud1temp(PC),a6
  2961.     bsr    mt_playit
  2962.     lea    $dff0b0,a5
  2963.     lea    mt_aud2temp(PC),a6
  2964.     bsr    mt_playit
  2965.     lea    $dff0c0,a5
  2966.     lea    mt_aud3temp(PC),a6
  2967.     bsr    mt_playit
  2968.     lea    $dff0d0,a5
  2969.     lea    mt_aud4temp(PC),a6
  2970.     bsr    mt_playit
  2971.     move.w    #$01f4,d0
  2972. mt_rls:    dbf    d0,mt_rls
  2973.  
  2974.     move.w    #$8000,d0
  2975.     or.w    mt_dmacon,d0
  2976.     move.w    d0,$dff096
  2977.  
  2978.     lea    mt_aud4temp(PC),a6
  2979.     cmp.w    #1,14(a6)
  2980.     bne.s    mt_voice3
  2981.     move.l    10(a6),$dff0d0
  2982.     move.w    #1,$dff0d4
  2983. mt_voice3:
  2984.     lea    mt_aud3temp(PC),a6
  2985.     cmp.w    #1,14(a6)
  2986.     bne.s    mt_voice2
  2987.     move.l    10(a6),$dff0c0
  2988.     move.w    #1,$dff0c4
  2989. mt_voice2:
  2990.     lea    mt_aud2temp(PC),a6
  2991.     cmp.w    #1,14(a6)
  2992.     bne.s    mt_voice1
  2993.     move.l    10(a6),$dff0b0
  2994.     move.w    #1,$dff0b4
  2995. mt_voice1:
  2996.     lea    mt_aud1temp(PC),a6
  2997.     cmp.w    #1,14(a6)
  2998.     bne.s    mt_voice0
  2999.     move.l    10(a6),$dff0a0
  3000.     move.w    #1,$dff0a4
  3001. mt_voice0:
  3002.     move.l    mt_partnote(PC),d0
  3003.     add.l    #$10,d0
  3004.     move.l    d0,mt_partnote
  3005.     cmp.l    #$400,d0
  3006.     bne.s    mt_stop
  3007. mt_higher:
  3008.     clr.l    mt_partnote
  3009.     addq.l    #1,mt_partnrplay
  3010.     moveq    #0,d0
  3011.     move.w    mt_maxpart(PC),d0
  3012.     move.l    mt_partnrplay(PC),d1
  3013.     cmp.l    d0,d1
  3014.     bne.s    mt_stop
  3015.     clr.l    mt_partnrplay
  3016. mt_stop:tst.w    mt_status
  3017.     beq.s    mt_stop2
  3018.     clr.w    mt_status
  3019.     bra.s    mt_higher
  3020. mt_stop2:
  3021.     rts
  3022.  
  3023. mt_playit:
  3024.     move.l    (a0,d1.l),(a6)
  3025.     addq.l    #4,d1
  3026.     moveq    #0,d2
  3027.     move.b    2(a6),d2
  3028.     and.b    #$f0,d2
  3029.     lsr.b    #4,d2
  3030.  
  3031.     move.b    (a6),d0
  3032.     and.b    #$f0,d0
  3033.     or.b    d0,d2
  3034.     tst.b    d2
  3035.     beq.s    mt_nosamplechange
  3036.  
  3037.     moveq    #0,d3
  3038.     lea    mt_samples(PC),a1
  3039.     move.l    d2,d4
  3040.     asl.l    #2,d2
  3041.     mulu    #$1e,d4
  3042.     move.l    (a1,d2),4(a6)
  3043.     move.w    (a3,d4.l),8(a6)
  3044.     move.w    2(a3,d4.l),18(a6)
  3045.     move.w    4(a3,d4.l),d3
  3046.     tst.w    d3
  3047.     beq.s    mt_displace
  3048.     move.l    4(a6),d2
  3049.     add.l    d3,d2
  3050.     move.l    d2,4(a6)
  3051.     move.l    d2,10(a6)
  3052.     move.w    6(a3,d4.l),8(a6)
  3053.     move.w    6(a3,d4.l),14(a6)
  3054.     move.w    18(a6),8(a5)
  3055.     bra.s    mt_nosamplechange
  3056.  
  3057. mt_displace:
  3058.     move.l    4(a6),d2
  3059.     add.l    d3,d2
  3060.     move.l    d2,10(a6)
  3061.     move.w    6(a3,d4.l),14(a6)
  3062.     move.w    18(a6),8(a5)
  3063. mt_nosamplechange:
  3064.     move.w    (a6),d0
  3065.     and.w    #$fff,d0
  3066.     tst.w    d0
  3067.     beq.s    mt_retrout
  3068.     move.w    (a6),16(a6)
  3069.     move.w    20(a6),$dff096
  3070.     move.l    4(a6),(a5)
  3071.     move.w    8(a6),4(a5)
  3072.     move.w    (a6),d0
  3073.     and.w    #$fff,d0
  3074.     move.w    d0,6(a5)
  3075.     move.w    20(a6),d0
  3076.     or.w    d0,mt_dmacon
  3077.  
  3078. mt_retrout:
  3079.     tst.w    (a6)
  3080.     beq.s    mt_nonewper
  3081.     move.w    (a6),22(a6)
  3082.  
  3083. mt_nonewper:
  3084.     move.b    2(a6),d0
  3085.     and.b    #$0f,d0
  3086.     cmp.b    #$0b,d0
  3087.     beq.s    mt_posjmp
  3088.     cmp.b    #$0c,d0
  3089.     beq.s    mt_setvol
  3090.     cmp.b    #$0d,d0
  3091.     beq.s    mt_break
  3092.     cmp.b    #$0e,d0
  3093.     beq.s    mt_setfil
  3094.     cmp.b    #$0f,d0
  3095.     beq.s    mt_setspeed
  3096.     rts
  3097.  
  3098. mt_posjmp:
  3099.     not.w    mt_status
  3100.     moveq    #0,d0
  3101.     move.b    3(a6),d0
  3102.     subq.b    #1,d0
  3103.     move.l    d0,mt_partnrplay
  3104.     rts
  3105.  
  3106. mt_setvol:
  3107.     move.b    3(a6),8(a5)
  3108.     rts
  3109.  
  3110. mt_break:
  3111.     not.w    mt_status
  3112.     rts
  3113.  
  3114. mt_setfil:
  3115.     moveq    #0,d0
  3116.     move.b    3(a6),d0
  3117.     and.b    #1,d0
  3118.     rol.b    #1,d0
  3119.     and.b    #$fd,$bfe001
  3120.     or.b    d0,$bfe001
  3121.     rts
  3122.  
  3123. mt_setspeed:
  3124.     move.b    3(a6),d0
  3125.     and.b    #$0f,d0
  3126.     beq.s    mt_back
  3127.     clr.w    mt_counter
  3128.     move.b    d0,mt_cool+3
  3129. mt_back:rts
  3130.  
  3131. mt_aud1temp:
  3132.     blk.w    10,0
  3133.     dc.w    1
  3134.     blk.w    2,0
  3135. mt_aud2temp:
  3136.     blk.w    10,0
  3137.     dc.w    2
  3138.     blk.w    2,0
  3139. mt_aud3temp:
  3140.     blk.w    10,0
  3141.     dc.w    4
  3142.     blk.w    2,0
  3143. mt_aud4temp:
  3144.     blk.w    10,0
  3145.     dc.w    8
  3146.     blk.w    2,0
  3147.  
  3148. mt_partnote:    dc.l    0
  3149. mt_partnrplay:    dc.l    0
  3150. mt_counter:    dc.w    0
  3151. mt_partpoint:    dc.l    0
  3152. mt_samples:    dc.l    0
  3153. mt_sample1:    blk.l    31,0
  3154. mt_maxpart:    dc.w    0
  3155. mt_dmacon:    dc.w    0
  3156. mt_status:    dc.w    0
  3157.  
  3158. mt_arpeggio:
  3159.     dc.w $0358,$0328,$02fa,$02d0,$02a6,$0280,$025c
  3160.     dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d
  3161.     dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0
  3162.     dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097
  3163.     dc.w $008f,$0087,$007f,$0078,$0071,$0000,$0000,$0000
  3164.  
  3165.  
  3166. ;------------------------------------------------------------------------------
  3167. ;----- Kopf auf Track fahren --------------------------------------------------
  3168. ;------------------------------------------------------------------------------
  3169. ;--- jsr Dsk_start     vor 1.Benutzung
  3170. ;--- jsr Dsk_move      Tracknr. in d0.b
  3171. ;--- jsr Dsk_end       nach letzter Benutzung
  3172. ;------------------------------------------------------------------------------
  3173. HL_Drive    = 0
  3174. HL_DskPt    = $dff020
  3175. HL_DskLen    = $dff024
  3176. HL_DskSync    = $dff07e
  3177. HL_AdkCon    = $dff09e
  3178. HL_AdkConr    = $dff010
  3179. HL_DmaCon    = $dff096
  3180.  
  3181. Dsk_start:
  3182.     movem.l    d0-d1,-(a7)
  3183.     move.w    #%1000000000010000,HL_DmaCon
  3184.     move.w    #%0001011100000000,HL_AdkCon    ; Diskformatparameter setzen
  3185.     move.w    #%1001110100000000,HL_AdkCon
  3186.     move.w    #$4489,HL_DskSync
  3187.    ; Motor ein
  3188.     bset    #HL_Drive+3,$bfd100
  3189.     bclr    #7,$bfd100
  3190.     bsr.w    HL_sel
  3191.    ; Track 0 suchen
  3192.     bset    #1,$bfd100
  3193.     clr.l    d0
  3194.        HL_Track:
  3195.     move.w    #$1000,d1        ; Seekdelay        
  3196.        HL_Track2:
  3197.     dbra    d1,HL_Track2
  3198.     btst    #4,$bfe001
  3199.     beq.s    HL_TrackEnd
  3200.     bclr    #0,$bfd100
  3201.     nop
  3202.     nop
  3203.     bset    #0,$bfd100
  3204.     add.l    #1,d0
  3205.     bra.s    HL_Track
  3206.        HL_TrackEnd:
  3207.     move.b    d0,HL_oldcyl
  3208.     move.b    #0,HL_cyl
  3209. HL_rootfalsch:
  3210.     move.w    #880,d0        ; Rootblock laden
  3211.     lea    HL_root(PC),a1
  3212.     bsr.w    BL_Laden
  3213.     cmp.l    #1,HL_root+508    ; Rootblock wirklich geladen
  3214.     beq.s    HL_rootstimmt
  3215.     move.b    #99,HL_oldtrack
  3216.     bra.s    HL_rootfalsch
  3217. HL_rootstimmt:
  3218.     movem.l    (a7)+,d0-d1
  3219.     rts
  3220. Dsk_move:
  3221.     movem.l    d0-d1,-(a7)
  3222.     and.l    #$ff,d0
  3223.     move.b    HL_cyl,d1
  3224.     move.b    d0,HL_cyl
  3225.     bset    #1,$bfd100
  3226.     sub.b    d0,d1
  3227.     bpl.s    HL_dm1
  3228.     bclr    #1,$bfd100
  3229.     neg.b    d1
  3230.        HL_dm1:
  3231.     tst.b    d1
  3232.     beq.s    HL_dm3
  3233.     move.w    #$1000,d0
  3234.        HL_dm2:
  3235.     dbra    d0,HL_dm2
  3236.     bclr    #0,$bfd100
  3237.     nop
  3238.     nop
  3239.     bset    #0,$bfd100
  3240.     subq.b    #1,d1
  3241.     bra.s    HL_dm1
  3242.        HL_dm3:
  3243.     movem.l    (a7)+,d0-d1
  3244.     rts    
  3245. Dsk_end:
  3246.     movem.l    d0,-(a7)
  3247.     move.b    HL_oldcyl(PC),d0
  3248.     bsr.b    Dsk_move
  3249.     bset    #HL_Drive+3,$bfd100
  3250.     bset    #7,$bfd100
  3251.     bclr    #HL_Drive+3,$bfd100
  3252.     movem.l    (a7)+,d0
  3253.     rts
  3254. HL_sel:
  3255.     or.b    #%01111000,$bfd100
  3256.     bclr    #HL_Drive+3,$bfd100
  3257. ;    btst    #5,$bfe001
  3258. ;    HL_Waitready:
  3259. ;    bne.s    HL_Waitready
  3260.     rts
  3261.     
  3262.     even
  3263. HL_Adkmerken:    dc.w    0
  3264. HL_cyl:        dc.b    0
  3265. HL_oldcyl:    dc.b    0
  3266.  
  3267. ;------------------------------------------------------------------------------
  3268.  
  3269.  
  3270.  
  3271. ;------------------------------------------------------------------------------
  3272. ;----- Track lesen ------------------------------------------------------------
  3273. ;------------------------------------------------------------------------------
  3274. ;--- jsr Tr_read    a0  Puffer fuer Daten
  3275. ;---            d0.b  Head (0=unten)
  3276. ;------------------------------------------------------------------------------
  3277. Tr_Drive    = 0
  3278. Tr_DskPt    = $dff020
  3279. Tr_DskLen    = $dff024
  3280. Tr_DskSync     = $dff07e
  3281. Tr_AdkCon    = $dff09e
  3282. Tr_intreq      = $dff09c
  3283. Tr_intreqr     = $dff01e
  3284. Tr_MFMLen    = 12774
  3285.  
  3286. Tr_read:
  3287.     movem.l    a0/d0-d1,-(a7)
  3288.     btst    #0,d0
  3289.     bne.s    Tr_unten
  3290.     bset    #2,$bfd100
  3291.     bra.s    Tr_head
  3292.     Tr_unten:
  3293.     bclr    #2,$bfd100
  3294.     Tr_head:
  3295.            move.w    #%0000000000000010,Tr_Intreq
  3296.     move.l    a0,Tr_DskPt
  3297.     move.w    #$0000,Tr_DskLen
  3298.     move.w    #(Tr_MFMLen)/2+$8000,d0    ; lesen
  3299.     move.w    d0,Tr_DskLen
  3300.     move.w    d0,Tr_DskLen
  3301.     move.b    $bfe801,d1
  3302.     add.b    #60,d1    
  3303. Tr_WaitBlock:
  3304.     move.w    Tr_intreqr,d0
  3305.            and.w    #%0000000000000010,d0
  3306.     bne.s    Tr_ReadTrackOk
  3307.     cmp.b    $bfe801,d1
  3308.     bpl.s    Tr_WaitBlock
  3309.     move.l    #1,d0
  3310.     bra.s    Tr_ReadTrackEnd
  3311. Tr_ReadTrackOk:
  3312.     move.l    #0,d0
  3313. Tr_ReadTrackEnd:
  3314.     move.w    #$0000,Tr_DskLen
  3315.     move.w    #%0000000000000010,Tr_intreq
  3316.     movem.l    (a7)+,a0/d0-d1
  3317.     rts    
  3318.  
  3319. ;------------------------------------------------------------------------------
  3320.  
  3321.  
  3322. ;------------------------------------------------------------------------------
  3323. ;----- Track MFM Dekodieren ---------------------------------------------------
  3324. ;------------------------------------------------------------------------------
  3325. ;--- jsr MFM_Decode    a0 Codierte daten -------------------------------------
  3326. ;---            a1 Decodierte Daten -----------------------------------
  3327. ;---            d0.b Sector (0-10) ------------------------------------
  3328. ;------------------------------------------------------------------------------
  3329. MFM_Decode:
  3330.     movem.l    a0-a2/d0-d2,-(a7)
  3331.     cmp.w    #$4489,(a0)
  3332.     beq.s    HL_zweisync
  3333.     subq.l    #2,a0
  3334.        HL_zweisync:
  3335.     subq.l    #6,a0        ; 2 Worte $aaaa und 1 Sync nicht gelesen
  3336.     move.w    10(a0),d1
  3337.     move.w    14(a0),d2
  3338.     and.w    #$5555,d1
  3339.     and.w    #$5555,d2
  3340.     lsl.w    #1,d1
  3341.     or.w    d2,d1        ; Anz.Sekt. bis Gap in d1        
  3342.     move.w    d1,d2
  3343.     lsr.w    #8,d2        ; Sektornr. in d2
  3344.  
  3345.     cmp.b    d2,d0
  3346.     beq.w    MFM_L1
  3347.  
  3348.     bgt.s    MFM_groesser
  3349.     add.b    #11,d0
  3350.     MFM_groesser:
  3351.     sub.b    d2,d0
  3352.     and.l    #$ff,d0
  3353.  
  3354.     cmp.b    d0,d1
  3355.     bgt.s    HL_nixgap
  3356.     beq.s    HL_erstersec
  3357.  
  3358.     sub.b    d1,d0
  3359.     and.l    #$ff,d1
  3360.     mulu    #1088,d1
  3361.     add.l    d1,a0
  3362.     HL_suchen2:
  3363.     cmp.l    #hl_raw+12774-1088,a0    ; falls Sync nicht gefunden
  3364.     bne.s    HL_gehtnoch2    
  3365.     move.l    #$12345678,(a1)
  3366.     movem.l    (a7)+,a0-a1/d0-d2
  3367.     rts
  3368.     HL_gehtnoch2:
  3369.     cmp.w    #$4489,(a0)+
  3370.     bne.s    HL_suchen2
  3371.     cmp.w    #$4489,(a0)
  3372.     beq.s    HL_einer2
  3373.     subq.l    #2,a0
  3374.     HL_einer2:                    
  3375.     subq.l    #6,a0
  3376.     mulu    #1088,d0
  3377.     add.l    d0,a0
  3378.     bra.s    MFM_L1
  3379.        HL_nixgap:
  3380.     mulu    #1088,d0
  3381.     add.l    d0,a0
  3382.     bra.s    MFM_L1
  3383.        HL_erstersec:
  3384.     mulu    #1088,d0
  3385.     add.l    d0,a0
  3386.     HL_suchen:
  3387.     cmp.l    #hl_raw+12774-1088,a0    ; falls Sync nicht gefunden
  3388.     bne.s    HL_gehtnoch
  3389.     move.l    #$12345678,(a1)
  3390.     movem.l    (a7)+,a0-a1/d0-d2
  3391.     rts
  3392.     HL_gehtnoch:
  3393.     cmp.w    #$4489,(a0)+
  3394.     bne.s    HL_suchen
  3395.     cmp.w    #$4489,(a0)
  3396.     beq.s    HL_einer
  3397.     subq.l    #2,a0
  3398.     HL_einer:                    
  3399.     subq.l    #6,a0
  3400.  
  3401.        MFM_L1:
  3402.     add.l    #64,a0        ; Block dekodieren
  3403.     move.l    a0,a2
  3404.     add.l    #1024/2,a2
  3405.     move.w    #512/4,d3
  3406.        MFM_DecodeL1:
  3407.     move.l    (a0)+,d1
  3408.     move.l    (a2)+,d2
  3409.     and.l    #$55555555,d1
  3410.     and.l    #$55555555,d2
  3411.     lsl.l    #1,d1
  3412.     or.l    d2,d1
  3413.     move.l    d1,(a1)+
  3414.     dbra    d3,MFM_DecodeL1
  3415.  
  3416.     movem.l    (a7)+,a0-a2/d0-d2
  3417.     rts
  3418.  
  3419. ;------------------------------------------------------------------------------
  3420.  
  3421.  
  3422. ;------------------------------------------------------------------------------
  3423. ;----- Block laden ------------------------------------------------------------
  3424. ;------------------------------------------------------------------------------
  3425. ;--- jsr BL_Laden    d0.w Blocknr. -----------------------------------------
  3426. ;------------------------------------------------------------------------------
  3427. BL_Laden:
  3428.     movem.l    d0-d4/a0-a1,-(a7)
  3429.     ext.l    d0
  3430.     move.l    d0,d1        ; Blocknr. in THS umrechnen
  3431.     divu.w    #22,d1    ;Track
  3432.     move.l    d1,d2
  3433.     mulu.w    #22,d2
  3434.     sub.w    d2,d0
  3435.     cmp.b    #10,d0
  3436.     bgt.s    HW_groesser
  3437.     move.b    #0,d2
  3438.     bra.s    HW_umrend
  3439.        HW_groesser:
  3440.     sub.b    #11,d0
  3441.     move.b    #1,d2
  3442.        HW_umrend:
  3443.     move.b    d0,d3
  3444.  
  3445.     move.b    HL_oldtrack,d4
  3446.     cmp.b    d1,d4
  3447.     beq.s    HL_nichtnochmal
  3448.     move.b    d1,HL_oldtrack
  3449.     move.b    d1,d0    ; Track
  3450.     jsr     Dsk_move
  3451.     bra.s    HL_muss
  3452.        HL_nichtnochmal:
  3453.     move.b    HL_oldhead,d4
  3454.     cmp.b    d2,d4
  3455.     beq.s    HL_auchnicht
  3456.        HL_muss:
  3457.     move.b    d2,HL_oldhead
  3458.     lea    HL_raw(PC),a0
  3459.     move.b    d2,d0    ; Head
  3460.     jsr    Tr_read
  3461.        HL_auchnicht:
  3462.     lea    HL_raw(PC),a0    ; dec.Adr in a1!
  3463.     move.b    d3,d0    ; Sector
  3464.     jsr    MFM_Decode
  3465.     movem.l    (a7)+,d0-d4/a0-a1
  3466.  
  3467.     movem.l    d0-d1/a1,-(a7)        ; fehlerfrei geladen ?
  3468.     cmp.l    #0,(a1)
  3469.     beq.s    HL_falsch
  3470.     move.l    #0,d1
  3471.     move    #127,d0
  3472.     HL_plus:
  3473.     add.l    (a1)+,d1
  3474.     dbra    d0,HL_plus
  3475.     tst.l    d1
  3476.     beq.s    HL_richtig
  3477.     HL_falsch:
  3478.     movem.l    (a7)+,d0-d1/a1
  3479.     move.b    #99,HL_oldtrack
  3480.     bra.w    BL_Laden
  3481.     HL_richtig:
  3482.     movem.l    (a7)+,d0-d1/a1
  3483.     rts
  3484.  
  3485. HL_oldtrack:    dc.b    99
  3486. HL_oldhead:    dc.b    99
  3487.  
  3488. ;------------------------------------------------------------------------------
  3489.  
  3490.  
  3491. ;------------------------------------------------------------------------------
  3492. ;----- File laden -------------------------------------------------------------
  3493. ;------------------------------------------------------------------------------
  3494. ;--- jsr Fi_Laden     Name ab HL_name: --------------------------------------
  3495. ;------------------------------------------------------------------------------
  3496. Fi_laden:
  3497.     movem.l    d0-d5/a0-a2,-(a7)
  3498.     move.l    HL_dest,a2
  3499.     bset    #HL_Drive+3,$bfd100    ; Motor ein 
  3500.     bclr    #7,$bfd100
  3501.     bsr.w    HL_sel
  3502.     move.l    #HL_namelength,d1    ; Hash berechnen
  3503.     move.l    #HL_Name,a1
  3504.     move.w    d1,d3
  3505.     subq.l    #1,d3
  3506.        HL_loop:
  3507.     mulu    #13,d1
  3508.     move.w    #0,d2
  3509.     move.b    (a1)+,d2
  3510.     cmp.b    #"a",d2
  3511.     blo.s    HL_ok
  3512.     cmp.b    #"z",d2
  3513.     bhi.s    HL_ok
  3514.     sub.b    #32,d2
  3515.        HL_ok:
  3516.     add.w    d2,d1
  3517.     and.w    #$7ff,d1
  3518.     dbra    d3,HL_loop
  3519.     divu    #72,d1
  3520.     swap    d1
  3521.     addq.w    #6,d1
  3522.     and.l    #$ffff,d1
  3523.     lsl.l    #2,d1
  3524.  
  3525.     lea    HL_root(PC),a0    ; 1.Block mit richtigem Hash
  3526.     add.l    d1,a0
  3527.     move.l    (a0),d0
  3528.     tst.l    d0
  3529.     bne.s    HL_gef
  3530.     bset    #0,Nicht_gefunden
  3531.     bra.w    HL_fend        ; Datei nicht gefunden
  3532.        HL_gef:
  3533.     move.l    a2,a1
  3534.     bsr.w    BL_Laden
  3535.     cmp.l    4(a2),d0 ; richtiger Block ?
  3536.     beq.s    HL_ja1
  3537.     move.b    #99,HL_oldtrack    
  3538.     bra.s    HL_gef
  3539.     HL_ja1:
  3540.  
  3541.        HL_v:
  3542.     move.w    #HL_namelength-1,d0 ; Kontrolle ob richtiger Header
  3543.     lea    HL_name(PC),a0
  3544.     move.l    a2,a1
  3545.     add.l    #433,a1
  3546.        HL_vergleich:
  3547.     move.b    (a1)+,d1
  3548.     cmp.b    #"a",d1
  3549.     blo.s    HL_ok2
  3550.     cmp.b    #"z",d1
  3551.     bhi.s    HL_ok2
  3552.     sub.b    #32,d1
  3553.        HL_ok2:
  3554.     move.b    (a0)+,d2
  3555.     cmp.b    #"a",d2
  3556.     blo.s    HL_ok3
  3557.     cmp.b    #"z",d2
  3558.     bhi.s    HL_ok3
  3559.     sub.b    #32,d2
  3560.        HL_ok3:
  3561.     cmp.b    d1,d2
  3562.     bne.s    HL_wrongHe
  3563.     dbra    d0,HL_vergleich
  3564.     bra.s    HL_databfound
  3565.  
  3566.        HL_wrongHe:        ; naechsten Header versuchen
  3567.     move.l    496(a2),d0
  3568.     tst.l    d0
  3569.     bne.s    HL_nochmehr
  3570.     bset    #0,Nicht_gefunden
  3571.     bra.w    HL_fend        ; Datei nicht gefunden
  3572.        HL_nochmehr:
  3573.     move.l    a2,a1
  3574.     bsr.w    BL_Laden
  3575.     cmp.l    4(a2),d0 ; richtiger Block ?
  3576.     beq.s    HL_ja2
  3577.     move.b    #99,HL_oldtrack    
  3578.     bra.s    HL_nochmehr
  3579.     HL_ja2:
  3580.     bra.s    HL_v
  3581.  
  3582.        HL_databfound:
  3583.     move.l    4(a2),d4 ; Fileheaderblock
  3584.     move.l    #1,d5    ; Blocknr. der Datei
  3585.     move.l    308(a2),d0
  3586.     move.l    a2,a1
  3587.     HL_lade1:
  3588.     bsr.w    BL_Laden
  3589.     cmp.l    4(a2),d4 ; richtiger Block ?
  3590.     bne.s    HL_nein1
  3591.     cmp.l    8(a2),d5
  3592.     bne.s    HL_nein1
  3593.     addq.l    #1,d5
  3594.     bra.s    HL_ja3
  3595.     HL_nein1:
  3596.     move.b    #99,HL_oldtrack
  3597.     bra.s    HL_lade1
  3598.     HL_ja3:
  3599.  
  3600.     move.l    a2,a0
  3601.        HL_nextblock:
  3602.     move.l    16(a0),d2    ; Naechster Block
  3603.     move.l    12(a0),d3    ; Anz.Bytes in Block
  3604.     move.l    a0,a1
  3605.     add.l    #24,a1
  3606.     move.w    #488-1,d0
  3607.        HL_kopier:
  3608.     move.b    (a1)+,d1
  3609.   btst    #0,FCodieren
  3610.   bne.s    NichtFC1                            
  3611.   ror.b    #3,d1            ; Decodieren (nur bei Suicide-Artikeln)
  3612.  NichtFC1:
  3613.     move.b    d1,(a0)+                        
  3614.     dbra    d0,HL_kopier
  3615.     tst.l    d2
  3616.     bne.s    HL_nocheiner
  3617.   btst        #0,FCodieren
  3618.   bne.s        NichtFC2                            
  3619.   move.l    #488,d2            ; Endmarkierung (nur bei Suicide-Artikeln)
  3620.   sub.l        d3,d2
  3621.   sub.l        d2,a0
  3622.   move.b    #$ff,(a0)+
  3623.   move.b    #$ff,(a0)+
  3624.   move.b    #$ff,(a0)+
  3625.   move.b    #$ff,(a0)+
  3626.  NichtFC2:
  3627.     bclr    #0,Nicht_gefunden
  3628.  bra.s    HL_fend    
  3629.        HL_nocheiner:
  3630.     move.l    d2,d0
  3631.     move.l    a0,a1
  3632.     HL_lade2:
  3633.     bsr.w    BL_Laden
  3634.     cmp.l    4(a1),d4 ; richtiger Block ?
  3635.     bne.s    HL_nein2
  3636.     cmp.l    8(a1),d5
  3637.     bne.s    HL_nein2
  3638.     addq.l    #1,d5
  3639.     bra.s    HL_nextblock
  3640.     HL_nein2:
  3641.     move.b    #99,HL_oldtrack
  3642.     bra.s    HL_lade2
  3643.  
  3644.  
  3645. HL_fend:
  3646.     bset    #HL_Drive+3,$bfd100
  3647.     bset    #7,$bfd100
  3648.     bclr    #HL_Drive+3,$bfd100
  3649.     movem.l    (a7)+,d0-d5/a0-a2
  3650.     rts
  3651.  
  3652.  
  3653. ;------------------------------------------------------------------------------
  3654. FCodieren:
  3655.     dc.b    0
  3656.     even
  3657. HL_dest:
  3658.     dc.l    0
  3659. HL_root:
  3660.     blk.b    544,0
  3661. HL_raw:
  3662.     blk.b    12774,0
  3663. HL_page:
  3664. ;    blk.b    1885,0
  3665. ;    dc.b    -1,-1,-1,-1
  3666.     blk.b    10500,$20
  3667. ;>Extern "df0:Externs/Versuchstext1",HL_page,1885
  3668.     even                
  3669.  
  3670. Mt_data:
  3671.     blk.b    91906,0
  3672. >extern "df0:Externs/Music",mt_Data,91906
  3673.         
  3674. ;
  3675. ;    -------------------------------------------------------------------
  3676. ;    -------------------------------------------------------------------
  3677. AnzArt:    dc.l 95     ; max. Anzahl minus 1        
  3678.         
  3679. ;    -------------------------------------------------------------------
  3680. ;    --- Extern Files --------------------------------------------------
  3681. ;    -------------------------------------------------------------------
  3682. ;    --- Grafik für Menubalken unten -----
  3683. ;    -------------------------------------
  3684. Menu:
  3685.     blk.b    21472,0
  3686.     MenuEnd:
  3687. >extern "df0:Externs/Dmenu2.prev.RAW",Menu,21472
  3688. >extern "df0:Externs/Dmenu2.prev.RAW",SaveMenu,21472
  3689.                                     
  3690.  
  3691. ;    -------------------------------------------------------------------
  3692. ;    --- Grafik für aktivierte Gadgets ---
  3693. ;    -------------------------------------
  3694.  
  3695. Drueber:
  3696.     blk.b    8992,0
  3697. >extern "df0:Externs/Dm.dueber2.RAW",Drueber,8992
  3698.                                         
  3699.  
  3700. ;    -------------------------------------------------------------------
  3701. ;    --- Platz für Kopie der Menugrafik --
  3702. ;    -------------------------------------
  3703. SaveMenu:
  3704.     blk.b    21472,0
  3705.  
  3706.  
  3707. ;    -------------------------------------------------------------------
  3708. ;    --- Grafik für ON/OFF toggle --------
  3709. ;    -------------------------------------
  3710. Music:
  3711.     blk.b    1824,0
  3712. >extern "df0:Externs/DmMusic2.RAW",Music,1824
  3713.                                 
  3714.  
  3715. ;    -------------------------------------------------------------------
  3716.  
  3717. Font:
  3718.     blk.b    1700,0
  3719.     Fontend:                                                    
  3720. >extern "df0:Externs/DMFont.RAW",Font,1700
  3721.  
  3722. ;    -------------------------------------------------------------------
  3723.  
  3724. Font2:        
  3725.     blk.b    752,0
  3726. >extern "df0:Externs/DMFont1Pl.RAW",Font2,752
  3727.  
  3728. ;    -------------------------------------------------------------------
  3729. Text:
  3730.     blk.b    7511,0            
  3731.     dc.b    -1,-1,-1,-1
  3732. >extern "df0:Externs/Menu",Text,7511
  3733.                     
  3734.             
  3735. ;    -------------------------------------------------------------------
  3736.                                 
  3737. Screen:
  3738.     blk.b    192000,$00
  3739.  
  3740.     
  3741. ;    -------------------------------------------------------------------
  3742. Grace:
  3743.